forked from mlangill/biotorrents
-
Notifications
You must be signed in to change notification settings - Fork 0
/
redir.php
23 lines (20 loc) · 871 Bytes
/
redir.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
require_once "include/bittorrent.php";
dbconn(false);
if(!isset($CURUSER))
die();
$url = '';
while (list($var,$val) = each($_GET))
$url .= "&$var=$val";
if(preg_match( "/([<>'\"]|'|!|"|%27|%22|%3E|%3C|'|"|>|<|\.js)/i", $url ))
header("Location: http://www.urbandictionary.com/define.php?term=twat");
$i = strpos($url, "&url=");
if ($i !== false)
$url = substr($url, $i + 5);
if (substr($url, 0, 4) == "www.")
$url = "http://" . $url;
if (strlen($url) < 10) die();
print("<html><head><meta http-equiv='refresh' content='3;url=$url'></head><body>\n");
print("<div style='width:100%;text-align:center;background: #E9D58F;border: 1px solid #CEAA49;margin: 5px 0 5px 0;padding: 0 5px 0 5px;font-weight: bold;'>Redirecting you to:<br />\n");
print(htmlentities($url)."</div></body></html>\n");
?>