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

Untitled

By: a guest on Dec 17th, 2012  |  syntax: None  |  size: 0.15 KB  |  views: 26  |  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. SELECT url FROM links ORDER BY RAND() LIMIT 1
  2.        
  3. $urls = array( ... );
  4. shuffle($urls);
  5.  
  6. // redirect to $url[0];
  7. header('Location: ' . $urls[0]);
  8. exit();
clone this paste RAW Paste Data