Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 14th, 2012  |  syntax: None  |  size: 2.09 KB  |  views: 29  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  <script type="text/JavaScript">
  2. function killCopy(e){
  3. return false
  4. }
  5. function reEnable(){
  6. return true
  7. }
  8. document.onselectstart=new Function ("return false")
  9. if (window.sidebar){
  10. document.onmousedown=killCopy
  11. document.onclick=reEnable
  12. }
  13. </script>
  14. <?php
  15. /// set some variables for txt to image generation
  16. $l = "<img style=\"padding: 1px;\" src=\"f.jpg\" alt=\"n\" />";
  17. $a = "<img style=\"padding: 1px;\" src=\"1.jpg\" alt=\"n\" />";
  18. $b = "<img style=\"padding: 1px;\" src=\"2.jpg\" alt=\"n\" />";
  19. $c = "<img style=\"padding: 1px;\" src=\"3.jpg\" alt=\"n\" />";
  20. $e = "<img style=\"padding: 1px;\" src=\"4.jpg\" alt=\"n\" />";
  21. $g = "<img style=\"padding: 1px;\" src=\"5.jpg\" alt=\"n\" />";
  22. $h = "<img style=\"padding: 1px;\" src=\"6.jpg\" alt=\"n\" />";
  23. $i = "<img style=\"padding: 1px;\" src=\"7.jpg\" alt=\"n\" />";
  24. $j = "<img style=\"padding: 1px;\" src=\"8.jpg\" alt=\"n\" />";
  25. $k = "<img style=\"padding: 1px;\" src=\"9.jpg\" alt=\"n\" />";
  26. $x = "<img style=\"padding: 1px;\" src=\"t.jpg\" alt=\"n\" />";
  27. $v = "<img style=\"padding: 1px;\" src=\"c.jpg\" alt=\"n\" />";
  28. //////////  load file use implode + br to format text correctly and form string
  29. $myFile = "testlist.txt";
  30. $contents = file($myFile);
  31. $string = implode("<br>", $contents);
  32. /////////// form pattern array for string to variable replacement
  33. $patterns = array();
  34. $patterns[1] = '1';
  35. $patterns[2] = '2';
  36. $patterns[3] = '3';
  37. $patterns[4] = '4';
  38. $patterns[5] = '5';
  39. $patterns[6] = '6';
  40. $patterns[7] = '7';
  41. $patterns[8] = '8';
  42. $patterns[9] = '9';
  43. $patterns[10] = '!';
  44. $patterns[11] = '([0-9].[0-9])';
  45. $patterns[12] = '0';
  46. $replacements = array();
  47. $replacements[12] = $l;
  48. $replacements[11] = $x;
  49. $replacements[10] = $v;
  50. $replacements[9] = $k;
  51. $replacements[8] = $j;
  52. $replacements[7] = $i;
  53. $replacements[6] = $h;
  54. $replacements[5] = $g;
  55. $replacements[4] = $e;
  56. $replacements[3] = $c;
  57. $replacements[2] = $b;
  58. $replacements[1] = $a;
  59. /////////////////////  lets put these in order
  60. ksort($patterns);
  61. ksort($replacements);
  62. ////////////////// now lets output it all :-)
  63. echo str_replace($patterns, $replacements, $string);
  64. ?>
clone this paste RAW Paste Data