Advertisement
Guest User

Untitled

a guest
Mar 28th, 2010
3,542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. <html>
  2. <head>
  3.     <title>search</title>
  4.     <script language="JavaScript">
  5.     function notFound(image) {
  6.         image.style.display = "none";
  7.     }
  8.     </script>
  9. </head>
  10. <body>
  11. <?php
  12. for ($i=0; $i<2000; $i++) {
  13.     $link = genLink();
  14.  
  15.     echo "<a href='http://pic.quiptxt.com/".$link."' target='_blank'><img alt='' width='100' height='100' border='0'src='http://quipimg.s3.amazonaws.com/".$link.".jpg' onerror='notFound(this);'></a> ";
  16. }
  17.  
  18. function genLink() {
  19.     // characters to use
  20.     $chars = array_merge(range('a','z'),range('0','9'));
  21.  
  22.     // shuffle array
  23.     shuffle($chars);
  24.  
  25.     // return characters
  26.     return substr(implode('',$chars),0,5);
  27. }
  28. ?>
  29. </body>
  30. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement