源代码如下:

  1. <?php
  2. $txt1=trim($_POST['text1']);
  3. $txt2=trim($_POST['text2']);
  4. $txt3=trim($_POST['text3']);
  5. $button=$_POST['button'];
  6. ?>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  8. <html>
  9. <head>
  10. <title>迅雷和FlashGet,QQ旋风地址 在线转换工具</title>
  11. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  12. <meta content="迅雷,FlashGet,在线地址转换,ahlang.com,ahlang" name="keywords">
  13. </head>
  14. <body>
  15. <form name="form1" method="post" action="">
  16. <hr size="1">
  17. <h3>迅雷转换</h3>
  18. <P>转换地址:
  19. <input name="text1" value="<?php echo $txt1;?>" type="text" style="width:516px;" /></P>
  20. <P>转换后的:
  21. <input type="text" value="<?php
  22. if($button=="普通地址->迅雷地址") echo "thunder://".base64_encode("AA".$txt1."ZZ");
  23. if($button=="迅雷地址->普通地址") echo substr(base64_decode(str_ireplace("thunder://","",$txt1)),2,-2);
  24. ?>" style="width:516px;" /></P>
  25. <P>
  26. <input type="submit" name="button" value="普通地址->迅雷地址" />
  27. <input type="submit" name="button" value="迅雷地址->普通地址" /></P>
  28. <h3>FlashGet转换</h3>
  29. <P>FlashGet地址:
  30. <input name="text2" value="<?php echo $txt2;?>" type="text" style="width:516px;" /></P>
  31. <P>转换后 地址:
  32. <input type="text" value="<?php
  33. if($button=="普通地址->FlashGet地址") echo "flashget://".base64_encode($txt2);
  34. if($button=="FlashGet地址->普通地址") echo str_ireplace("[FLASHGET]","",base64_decode(str_ireplace("flashget://","",$txt2)));
  35. ?>" style="width:516px;" /></P>
  36. <P>
  37. <input type="submit" value="普通地址->FlashGet地址" name="button" />
  38. <input type="submit" value="FlashGet地址->普通地址" name="button" /></P>
  39. <h3>QQ旋风转换</h3>
  40. <P>QQ旋风地址:
  41. <input name="text3" value="<?php echo $txt3;?>" type="text" style="width:516px;" /></P>
  42. <P>转换后 地址:
  43. <input type="text" value="<?php
  44. if($button=="普通地址->QQ旋风") echo "qqdl://".base64_encode($txt3);
  45. if($button=="QQ旋风->普通地址") echo base64_decode(str_ireplace("qqdl://","",$txt3));
  46. ?>" style="width:516px;" /></P>
  47. <P>
  48. <input type="submit" value="普通地址->QQ旋风" name="button" />
  49. <input type="submit" value="QQ旋风->普通地址" name="button" /></P>
  50. </form>
  51. </body>
  52. </html>