X-Git-Url: https://472bisson.ca/gitweb/magnet.git/blobdiff_plain/6351182c4f4abea9796adf4b5fe17bbc7dbda907..62e96b27b092c3c529f8da78b8e8548e058a834f:/index.php
diff --git a/index.php b/index.php
index 2dad933..090c191 100644
--- a/index.php
+++ b/index.php
@@ -1,33 +1,49 @@
-
- Torrage
-
-
-
-
- Torrage
-
-
+ Torrage
+
+
+
+
+ Torrage
+
+ ";
+ if ($site == 'torrage')
{
- $infohash = filter_input(INPUT_GET, 'infohash');
-
- if(strlen($infohash) == 40 && ctype_xdigit($infohash))
- {
- //echo "Debug:$url = ".$url."
";
- $url = "http://torrage.com/torrent/".$infohash.".torrent";
- header( 'Location: '.$url ) ; //Internet
- }
- else
- {
- echo "Invalid INFO_HASH";
- }
- }
- ?>
-
+ $url = "http://torrage.com/torrent/" . $infohash . ".torrent";
+ header('Location: ' . $url); //Internet
+ }
+ else
+ {
+ $url = "http://torcache.net/torrent/" . $infohash . ".torrent";
+ header('Location: ' . $url); //Internet
+ }
+ }
+ else
+ {
+ echo "Invalid INFO_HASH";
+ }
+ }
+ ?>
+