A simple PHP-script for random text

3 replies
This PHP-script shows random text/links or what ever you want.
I was thinking about using it to show AdBrite SmartZone ads.
In one SmartZone is max. 25 ads.
Using this script I can show even more.

And yes, I could use AdRotate if I'm using WP.
But, here it is if you need it.


Code:
< ?
//set the urls
$urls = array(
'- Insert text/link/code here -', // Insert your code/text between the ' '
'- Insert text/link/code here -',
'- Insert text/link/code here -',
'- Insert text/link/code here -'); // Last line, use no comment at the end (,)
 
srand(time());
 
//set the number in (rand()%3); for however many links there are
$random = (rand()%4);
echo ("$urls[$random]");
?>
#phpscript #random #simple #text

Trending Topics