enwikipedia-acc /
waca
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | $toolList = array( |
||
| 4 | 'tparis-pcount' => '//tools.wmflabs.org/supercount/index.php?user=%DATA%&project=en.wikipedia', |
||
| 5 | 'luxo-contributions' => '//tools.wmflabs.org/quentinv57-tools/tools/globalcontribs.php?username=%DATA%', |
||
| 6 | 'guc' => '//tools.wmflabs.org/guc/?user=%DATA%', |
||
| 7 | 'oq-whois' => 'https://whois.domaintools.com/%DATA%', |
||
| 8 | 'tl-whois' => 'https://tools.wmflabs.org/whois/gateway.py?lookup=true&ip=%DATA%', |
||
| 9 | 'honeypot' => 'https://www.projecthoneypot.org/ip_%DATA%', |
||
| 10 | 'sulutil' => '//tools.wmflabs.org/quentinv57-tools/tools/sulinfo.php?showinactivity=1&showblocks=1&username=%DATA%', |
||
| 11 | 'google' => 'https://www.google.com/search?q=%DATA%', |
||
| 12 | ); |
||
| 13 | |||
| 14 | if(!isset($_GET['tool']) |
||
| 15 | || !isset($toolList[$_GET['tool']]) |
||
| 16 | || !isset($_GET['data']) |
||
| 17 | ) |
||
| 18 | { |
||
| 19 | header("HTTP/1.1 403 Forbidden"); |
||
| 20 | return; |
||
| 21 | } |
||
| 22 | |||
| 23 | if (isset($_GET['round2'])) { |
||
| 24 | echo '<script>window.location.href=' . json_encode(str_replace("%DATA%", urlencode($_GET['data']), $toolList[$_GET['tool']])) . '</script>'; |
||
|
0 ignored issues
–
show
|
|||
| 25 | } |
||
| 26 | else { |
||
| 27 | header("Location: " . $_SERVER["REQUEST_URI"] . "&round2=true"); |
||
| 28 | } |
||
| 29 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.