From: Manjunath CV Date: Wed, 25 Dec 2013 11:58:47 +0000 (+0530) Subject: Validated InfoHash and Style. X-Git-Url: https://472bisson.ca/gitweb/magnet.git/commitdiff_plain/9d9004e2b66ba893fe79375fe23ffb6f31800cdf?ds=sidebyside Validated InfoHash and Style. --- diff --git a/index.php b/index.php index af11214..c32640f 100644 --- a/index.php +++ b/index.php @@ -7,33 +7,36 @@ -

Torrage

- + -
"; - - $url = "http://torrage.com/torrent/".$infohash.".torrent"; - - echo $url; - - header( 'Location: '.$url ) ; //Internet + //echo "Debug:IF -- ".$_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"; + } } ?> + + - + \ No newline at end of file diff --git a/infohash.txt b/infohash.txt new file mode 100644 index 0000000..0036829 --- /dev/null +++ b/infohash.txt @@ -0,0 +1,8 @@ +http://torrage.com/torrent/640FE84C613C17F663551D218689A64E8AEBEABE.torrent + + +ubuntu-13.10-desktop-i386.iso --> 597A92F6EEED29E6028B70B416C847E51BA76C38 + +non exist --> 886D8CA336A8BBE7C1B19C8B5D23729496F7A48F + +xbmc-12.3.exe --> F948DD1E2A216B018FC3B5BA3FB4B1A63F61F06B \ No newline at end of file diff --git a/style.css b/style.css index 3ccef14..e5611c1 100644 --- a/style.css +++ b/style.css @@ -1,9 +1,42 @@ -/* CSS layout */ +/* CSS layout */ body{ margin: 5px; padding: 5px; - font-family: 'Voces', cursive; + font-family: monospace; } -/*http://www.tdl.com/~jrb/jrb7/css_textfield0.html */ \ No newline at end of file +input[type=text] { + width: 420px; + height: 30px; + padding: 1px; + + font-family:monospace; + font-size:large; +} + +input[type=submit] { + + font-family:monospace; + font-size:large; + + border: 1px solid #777777; + background: #6e9e2d; + color: white; + font: bold 11px 'Trebuchet MS'; + padding: 4px; + height: 30px; + cursor: pointer; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; +*/} + + + + +/* + +http://www.tdl.com/~jrb/jrb7/css_textfield0.html +http://www.red-team-design.com/style-an-input-button + +*/ \ No newline at end of file