- Impact
- 0
hope this isn't too off topic but does anyone know of a simple random url script? prefereably php or javascript
Random URL script meaning?
Submitted pages? or just goes to any page on the web?
<?
$lines = file("url.txt") ;
$url = $lines[array_rand($lines)] ;
header("LOCATION: $url");
?>
Create theses 2 files:
file.php (or what ever you want to call it)
url.txt
Put this in the .php file:
PHP:<? $lines = file("url.txt") ; $url = $lines[array_rand($lines)] ; header("LOCATION: $url"); ?>
then put the url's in the url.txt file (one URL per line)(make sure each URL has http:// or https://).