Completed
Push — master ( 04d19a...743d3f )
by Simon
02:19
created

Upgrade to new PHP Analysis Engine

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
	'stopforumspam' => 'https://www.stopforumspam.com/ipcheck/%DATA%',
11
	'sulutil' => '//tools.wmflabs.org/quentinv57-tools/tools/sulinfo.php?showinactivity=1&showblocks=1&username=%DATA%',
12
	'google' => 'https://www.google.com/search?q=%DATA%',
13
);
14
15
if(!isset($_GET['tool'])
16
	|| !isset($toolList[$_GET['tool']])
17
	|| !isset($_GET['data'])
18
)
19
{
20
	header("HTTP/1.1 403 Forbidden");
21
	return;
22
}
23
24
if (isset($_GET['round2'])) {
25
	echo '<script>window.location.href=' . json_encode(str_replace("%DATA%", urlencode($_GET['data']), $toolList[$_GET['tool']])) . '</script>';
0 ignored issues
show
This line exceeds maximum limit of 120 characters; contains 141 characters

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.

Loading history...
26
}
27
else {
28
	header("Location: " . $_SERVER["REQUEST_URI"] . "&round2=true");
29
}
30