I was extremely bored this afternoon, so here it is, the converter for converting download links among FlashGet, QQ Tornado and Xunle, and also decrypting the real link. The tool is pretty much self-explanatory (and useless) so I guess there’s no need for any manuals or instructions. If you are bored too, you can check out the source below, just don’t tell me how ugly it is, coz I’m fully aware of it!
You can find this converter on the “Tool” page, link is at the top of the page.
今天下午極度無聊, 就隨便寫了個可以在 FlashGet, QQ旋風和迅雷間轉換下載鏈接的小工具, 也可以直接看到真實鏈接. 功能及其直白, 就不提供什麼說明了. 如果你跟我一樣無聊, 以下有代碼奉上. 我知道代碼寫得很醜, 所以就不要提到這點啦!
你可以在”Tool”頁面看到這個工具, 鏈接在頁面頂部.
<?php $link = trim($_POST['link']); $to = $_POST['to']; $from = null; $out = ''; if($link != null) { $strAry = split('://', $link); $size = sizeof($strAry); if($size == 2) { $protocol = $strAry[0]; if(strcasecmp($protocol, 'flashget') == 0) { $from = 'fg'; } else if (strcasecmp($protocol, 'qqdl') == 0) { $from = 'qq'; } else if (strcasecmp($protocol, 'thunder') == 0) { $from = 'xl'; } if ($from == null) { $out = 'this link is not in the correct format'; } else if ($from == $to) { $out = 'no conversion needed you stupid fuck'; } else { $real_link = ''; $decoded_link = base64_decode($strAry[1]); if(!$decoded_link) { $out = 'this link is not in the correct format'; } else { switch($from) { case 'fg': $real_link = str_replace('[FLASHGET]','',$decoded_link); break; case 'qq': $real_link = $decoded_link; break; case 'xl': $real_link = substr($decoded_link, 2, -2); break; } switch($to) { case 'fg': $out = 'flashget://'.base64_encode('[FLASHGET]'.$real_link.'[FLASHGET]'); break; case 'qq': $out = 'qqdl://'.base64_encode($real_link); break; case 'xl': $out = 'thunder://'.base64_encode('AA'.$real_link.'ZZ'); break; case 'no_encrypt': $out = iconv('GB18030','UTF-8',$real_link); break; } } } } else { $out = 'this link is not in the correct format'; } } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <html> <head> <meta http-equiv="Content-Type" content="text/html; charset="utf-8"> <link type="text/css" href="iframe.css" rel="stylesheet" /> <style type="text/css"> textarea { width: 100%; height: 4em; } </style> </head> <body> <h2>Download Link Converter</h2> <form action="" method="post"> <label for="link">Paste the download link here (FlashGet, QQ Tornado, or Xunlei)</label> <textarea name="link"><?php echo $link; ?></textarea> <label for="to"> Select the format you want to convert to: </label> <select name="to"> <option value="fg">FlashGet</option> <option value="qq">QQ Tornado</option> <option value="xl">Xunlei</option> <option value="no_encrypt">Unencrypted</option> </select> <button type="submit">Convert</button> </form> <textarea> <?php echo $out; ?> </textarea> </body> </html>
too reet