Unstoppable Domains โ€” Expired Auctions

Help! Need a bit of code.

Spacemail by SpaceshipSpacemail by Spaceship
Watch

Jeffler

Established Member
Impact
7
I need something that will redirect someone to a random page. So if they're at index.html/php/whatever, and the code has a list of a.com, b.com, or c.com, it picks a random one and redirects them to the site.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Haven't tested, but should work:

PHP:
<?php
$domains = array('www.a.com', 'www.b.com', 'www.c.com');
$location = $domains[random(0, count($domains)-1)];
header('Location: http://' . $location);
?>
 
0
•••
Mikor said:
Haven't tested, but should work:

PHP:
<?php
$domains = array('www.a.com', 'www.b.com', 'www.c.com');
$location = $domains[random(0, count($domains)-1)];
header('Location: http://' . $location);
?>

Well how do you get it to redirect from there?
 
0
•••
0
•••
The only problem with that code is that the function is rand( and not random(.

:gl:
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Appraise.net
Domain Recover
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back