- echo "Debug:IF --".$_GET["infohash"]."<br /> ";
-
- $url = "http://torrage.com/torrent/".$infohash.".torrent";
-
- echo $url;
-
- header( 'Location: '.$url ) ; //Internet
-
+ //echo "Debug:IF -- ".$_GET["infohash"]."<br /> ";
+ if(strlen($infohash) == 40 && ctype_xdigit($infohash))
+ {
+ //echo "Debug:$url = ".$url."<br />";
+ $url = "http://torrage.com/torrent/".$infohash.".torrent";
+ header( 'Location: '.$url ) ; //Internet
+ }
+ else
+ {
+ echo "<a>Invalid INFO_HASH</a>";
+ }