cyfer65 Posted June 30, 2009 Report 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 Report 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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now