]> 472bisson.ca Git - magnet.git/blob - index.php
Added iStoreTor
[magnet.git] / index.php
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <title>Torrage</title>
5 <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
6 <link href="style.css" rel="stylesheet" type="text/css" />
7 </head>
8 <body>
9 <h1>Torrage</h1>
10 <form action="index.php" method="get">
11 <input type="text" name="infohash"/>
12 <input type="submit" value="Get .torrent"/>
13 <br />
14 <input type="radio" name="site" value="torrage" checked/>
15 <span>Torrage</span>
16 <input type="radio" name="site" value="torcache"/>
17 <span>Torcache</span>
18 <input type="radio" name="site" value="zoink"/>
19 <span>Zoink</span>
20 <input type="radio" name="site" value="istoretor"/>
21 <span>iStoreTor</span>
22 </form>
23 <?php
24 /************************
25 http://torrage.com/torrent/640FE84C613C17F663551D218689A64E8AEBEABE.torrent
26 http://torcache.net/torrent/640FE84C613C17F663551D218689A64E8AEBEABE.torrent
27 http://zoink.it/torrent/640FE84C613C17F663551D218689A64E8AEBEABE.torrent
28 * http://istoretor.com/fdown.php?hash=640FE84C613C17F663551D218689A64E8AEBEABE
29 *************************/
30 if(filter_has_var(INPUT_GET, 'infohash') && filter_has_var(INPUT_GET, 'site'))
31 {
32 $infohash = filter_input(INPUT_GET, 'infohash');
33 $site = filter_input(INPUT_GET, 'site');
34 if(strlen($infohash) == 40 && ctype_xdigit($infohash))
35 {
36 $infohash = strtoupper($infohash);
37 //echo "Debug:$url = ".$url."<br />";
38 if($site == 'torrage')
39 {
40 $url = "http://torrage.com/torrent/" . $infohash . ".torrent";
41 header('Location: ' . $url); //Internet
42 }
43 else if($site == 'torcache')
44 {
45 $url = "http://torcache.net/torrent/" . $infohash . ".torrent";
46 header('Location: ' . $url); //Internet
47 }
48 else if($site == 'istoretor')
49 {
50 $url = "http://istoretor.com/fdown.php?hash=" . $infohash . ".torrent";
51 header('Location: ' . $url); //Internet
52 }
53 else
54 {
55 $url = "http://zoink.it/torrent/" . $infohash . ".torrent";
56 header('Location: ' . $url); //Internet
57 }
58 }
59 else
60 {
61 echo "<span>Invalid INFO_HASH</span>";
62 }
63 }
64 ?>
65 </body>
66 </html>