<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href="style.css" rel="stylesheet" type="text/css" />
- <link href='http://fonts.googleapis.com/css?family=Voces' rel='stylesheet' type='text/css'>
</head>
<body>
<h1>Torrage</h1>
<form action="index.php" method="get">
- <input type="text" width="600" name="infohash"/>
+ <input type="text" name="infohash"/>
<input type="submit" value="Get .torrent"/>
-
</form>
<?php
//http://torrage.com/torrent/640FE84C613C17F663551D218689A64E8AEBEABE.torrent
-
if(isset($_GET["infohash"]))
{
$infohash = $_GET['infohash'];
- 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>";
+ }
}
?>
+ <label></label>
+ </body>
-</html>
+</html>
\ No newline at end of file
--- /dev/null
+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
-/* 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