cyfer65 Posted June 30, 2009 Share Posted June 30, 2009 How could I make a Random Link Forwarder...So Say I have 5 links that when you visit the PHP page it randomly selects one of those links to forward you to..How would the PHP code look like for something like this..?? Link to comment Share on other sites More sharing options...
Ingolme Posted June 30, 2009 Share Posted June 30, 2009 You use mt_rand() to obtain a random number, or if you want, you can use array_rand(), to obtain a random URL from an array.Then you use the URL with a location header using PHP's header() function. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.