]>
472bisson.ca Git - magnet.git/blob - index.php
18644b2f4424f737a995017cc047fadd1ce920b8
5 <meta content
="text/html; charset=utf-8" http
-equiv
="Content-Type">
6 <link href
="style.css" rel
="stylesheet" type
="text/css" />
10 <form action
="index.php" method
="get">
11 <input type
="text" name
="infohash"/>
12 <input type
="submit" value
="Get .torrent"/>
14 <input type
="radio" name
="site" value
="torrage" checked
/>
16 <input type
="radio" name
="site" value
="torcache"/>
18 <input type
="radio" name
="site" value
="zoink"/>
22 /************************
23 http://torrage.com/torrent/640FE84C613C17F663551D218689A64E8AEBEABE.torrent
24 http://torcache.net/torrent/640FE84C613C17F663551D218689A64E8AEBEABE.torrent
25 http://zoink.it/torrent/640FE84C613C17F663551D218689A64E8AEBEABE.torrent
26 *************************/
27 if(filter_has_var(INPUT_GET
, 'infohash') && filter_has_var(INPUT_GET
, 'site'))
29 $infohash = filter_input(INPUT_GET
, 'infohash');
30 $site = filter_input(INPUT_GET
, 'site');
31 if(strlen($infohash) == 40 && ctype_xdigit($infohash))
33 $infohash = strtoupper($infohash);
34 //echo "Debug:$url = ".$url."<br />";
35 if($site == 'torrage')
37 $url = "http://torrage.com/torrent/" . $infohash . ".torrent";
38 header('Location: ' . $url); //Internet
40 else if($site == 'torcache')
42 $url = "http://torcache.net/torrent/" . $infohash . ".torrent";
43 header('Location: ' . $url); //Internet
47 $url = "http://zoink.it/torrent/" . $infohash . ".torrent";
48 header('Location: ' . $url); //Internet
53 echo "<span>Invalid INFO_HASH</span>";