Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 0.72 KB  |  hits: 17  |  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. applying a random variable randomly
  2. $line = str_replace ("a", "@", $line);
  3.        
  4. $fonts = array("Helvetica", "Arial", "Courier", "Georgia", "Serif", "Comic Sans", "Tahoma", "Geneva", "Times New Roman");
  5. shuffle($fonts);
  6.  
  7. $output = "";
  8.  
  9. $lines = array_slice(file("users.txt"), -20, 20);
  10.  
  11. $i = 0;
  12. foreach ( $lines as $line ) {
  13.   if($i == count($fonts)) {
  14.     shuffle($fonts);
  15.     $i = 0;
  16.   }
  17.   $output .= '<div style="font-size: ' . rand(15, 23) . 'px; font-family:' . $fonts[$i] . '; margin-left: ' . rand(0, 60) . '%; opacity: 0.8;">' . $line . "</div>n";
  18.   $i++;
  19.     }
  20.  
  21. echo $output;
  22.        
  23. if(rand(0, 9) == 1)
  24. {
  25.     $line = str_replace ("a", "@", $line);
  26. }
  27.        
  28. $rand = rand(0,9);
  29. if($rand == 0)
  30. {
  31.     $line = str_replace("a","@",$line);
  32. }