]> 472bisson.ca Git - magnet.git/commitdiff
Magnet Only
authorManjunath CV <cvmanjoo@users.noreply.github.com>
Mon, 28 May 2018 20:53:07 +0000 (02:23 +0530)
committerManjunath CV <cvmanjoo@users.noreply.github.com>
Mon, 28 May 2018 20:53:07 +0000 (02:23 +0530)
Added W3.css Theme

index.php
magnet.php [deleted file]
style.css [deleted file]

index 0838e177056c49aff3f8c8dcb99f88c8d1487832..bda47446b534b861d9dc2a9f2f7ce5443b4ec225 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,71 +1,73 @@
 <?php\r
-/************************\r
-  http://torrage.com/torrent/640FE84C613C17F663551D218689A64E8AEBEABE.torrent\r
-  http://torcache.net/torrent/640FE84C613C17F663551D218689A64E8AEBEABE.torrent\r
-  http://zoink.it/torrent/640FE84C613C17F663551D218689A64E8AEBEABE.torrent\r
-  http://istoretor.com/fdown.php?hash=640FE84C613C17F663551D218689A64E8AEBEABE\r
- *************************/\r
-if(filter_has_var(INPUT_GET, 'infohash') && filter_has_var(INPUT_GET, 'site'))\r
+if(filter_has_var(INPUT_GET, 'submit'))\r
 {\r
     $infohash = filter_input(INPUT_GET, 'infohash');\r
-    $site = filter_input(INPUT_GET, 'site');\r
+    $name = filter_input(INPUT_GET, 'tname');\r
+    $trackers = filter_input(INPUT_GET, 'trackers');\r
+\r
     if(strlen($infohash) == 40 && ctype_xdigit($infohash))\r
     {\r
-        $infohash = strtoupper($infohash);\r
-        //echo "Debug:$url = ".$url."<br />";\r
-        if($site == 'torrage')\r
+        $magnetlink = "magnet:?xt=urn:btih:" . $infohash;\r
+\r
+        if($name != "")\r
         {\r
-            $url = "http://torrage.com/torrent/" . $infohash . ".torrent";\r
-            header('Location: ' . $url);  //Internet \r
+            $magnetlink = $magnetlink . "&dn=" . $name;\r
         }\r
-        else if($site == 'torcache')\r
+        if($trackers != "")\r
         {\r
-            $url = "http://torcache.net/torrent/" . $infohash . ".torrent";\r
-            header('Location: ' . $url);  //Internet \r
-        }\r
-        else if($site == 'istoretor')\r
-        {\r
-            $url = "http://istoretor.com/fdown.php?hash=" . $infohash . ".torrent";\r
-            header('Location: ' . $url);  //Internet \r
-        }\r
-        else\r
-        {\r
-            $url = "http://zoink.it/torrent/" . $infohash . ".torrent";\r
-            header('Location: ' . $url);  //Internet \r
+            $magnetlink = $magnetlink . "&tr=" . $trackers;\r
         }\r
     }\r
-    else\r
-    {\r
-        echo "<span>Invalid INFO_HASH</span>";\r
-    }\r
+    //$magnetlink = "magnet:?xt=urn:btih:" .$infohash . "&dn=" . $name . "&tr=" . $trackers;\r
 }\r
 ?>\r
 <!DOCTYPE html>\r
 <html lang="en">\r
     <head>\r
-        <title>Torrage</title>\r
-        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">\r
-        <link href="style.css" rel="stylesheet" type="text/css" />\r
+        <title>Magnet</title>\r
+        <meta charset="utf-8" />\r
+        <meta name="viewport" content="width=device-width, initial-scale=1">\r
+        <link rel="stylesheet" type="text/css" href="https://www.w3schools.com/w3css/4/w3.css">\r
     </head>\r
     <body>\r
-        <h1>Torrage</h1>\r
-        <form action="index.php" method="get">\r
-            <input type="text" name="infohash"/>\r
-            <input type="submit" value="Get .torrent"/>\r
-            <br />\r
-            <input type="radio" name="site" value="torrage" checked/>\r
-            <span>Torrage</span>\r
-            <input type="radio" name="site" value="torcache"/>\r
-            <span>Torcache</span>\r
-            <input type="radio" name="site" value="zoink"/>\r
-            <span>Zoink</span>\r
-            <input type="radio" name="site" value="istoretor"/>\r
-            <span>iStoreTor</span>\r
-        </form>                \r
-        <br>\r
-        <br>\r
-        <a href="magnet.php">Create Magnet link</a>\r
-        \r
-        \r
-    </body>\r
-</html>                                                                                                           
\ No newline at end of file
+      <div class="w3-card-4">\r
+        <div class="w3-container w3-green">\r
+          <h2>Magnet Info</h2>\r
+        </div>\r
+        <form class="w3-container" name="form1" method="get" action="#">\r
+          <p>\r
+            <label>Infohash</label>\r
+            <input class="w3-input" type="text" name="infohash" placeholder="Hash of the Torrent" />\r
+          </p>\r
+          <p>\r
+            <label>Name</label>\r
+            <input class="w3-input" type="text" name="tname" placeholder="Name of the Torrent" />\r
+          </p>\r
+          <p>\r
+            <label>Trackers</label>\r
+            <input class="w3-input" type="text" name="trackers" placeholder="Trackers" />\r
+          </p>\r
+          <p>\r
+            <input class="w3-button w3-green" type="submit" name="submit" value="Create"/>\r
+            <input class="w3-button w3-green" type="reset" name="reset" value="Reset">\r
+          </p>\r
+        </form>\r
+    </div>\r
+    <?php if(isset($magnetlink))\r
+    {\r
+      ?>\r
+      <div class="w3-panel w3-pale-green w3-leftbar w3-border-green">\r
+          <p><a href = "<?php echo $magnetlink; ?>"><?php echo $magnetlink; ?></a></p>\r
+      </div>\r
+      <?php\r
+    }\r
+    else {\r
+      ?>\r
+      <div class="w3-panel w3-pale-green w3-leftbar w3-border-green">\r
+          <p>Enter Some Torrent Info Hash</p>\r
+      </div>\r
+      <?php\r
+    }\r
+    ?>\r
+  </body>\r
+</html>
\ No newline at end of file
diff --git a/magnet.php b/magnet.php
deleted file mode 100644 (file)
index 1ad8c2f..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-if(filter_has_var(INPUT_GET, 'submit'))
-{
-    $infohash = filter_input(INPUT_GET, 'infohash');
-    $name = filter_input(INPUT_GET, 'tname');
-    $trackers = filter_input(INPUT_GET, 'trackers');
-
-    if(strlen($infohash) == 40 && ctype_xdigit($infohash))
-    {
-        $magnetlink = "magnet:?xt=urn:btih:" . $infohash;
-
-        if($name != "")
-        {
-            $magnetlink = $magnetlink . "&dn=" . $name;
-        }
-        if($trackers != "")
-        {
-            $magnetlink = $magnetlink . "&tr=" . $trackers;
-        }
-    }
-    //$magnetlink = "magnet:?xt=urn:btih:" .$infohash . "&dn=" . $name . "&tr=" . $trackers;
-}
-?>
-<!DOCTYPE html>
-<html lang="en">
-    <head>
-        <meta charset="utf-8" />
-        <link href="style.css" rel="stylesheet" type="text/css" />
-        <title>Magnet</title>
-    </head>
-    <body>
-        <form name="form1" method="get" action="#">
-
-            <label>Infohash</label>
-            <br>
-            <input type="text" name="infohash" placeholder="Hash of the Torrent" />
-            <br>
-
-            <label>Name</label>
-            <br>
-            <input type="text" name="tname" placeholder="Name of the Torrent" />
-            <br>
-
-            <label>Trackers</label>
-            <br>
-            <textarea rows="4" name="trackers">udp://tracker.openbittorrent.com:80/announce&#13;&#10;udp://tracker.publicbt.com:80/announce</textarea>
-            <br>
-            <input type="submit" name="submit" value="Create"/>
-        </form>
-
-        <span><?php echo $magnetlink; ?></span>
-        <br>
-        <a href = "<?php echo $magnetlink; ?>">Magnet Link</a>
-    </body>
-</html>
diff --git a/style.css b/style.css
deleted file mode 100644 (file)
index 3481055..0000000
--- a/style.css
+++ /dev/null
@@ -1,47 +0,0 @@
-/* CSS layout */
-
-body {
-    margin: 5px;
-    padding: 5px;
-    font-family: monospace;
-}
-
-input[type=text] {
-    width: 420px;
-    height: 30px;
-    padding: 1px;
-
-    font-family:monospace;
-    font-size:large;
-}
-
-textarea {
-    width: 420px;
-    padding: 1px;
-
-    font-family:monospace;
-    font-size:medium;
-}
-
-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