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