Home | Scripts | Tutorials | Books | Hosting | Forums | Links|

Navigation:

Home
Source code
Tutorials
RSS feeds
Articles
Wordpress plugins
Blog
Books
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links






 
 

SPONSORS



 
 

Random URL

Do you have a list of sites you would like to display links for , do you want to stop users getting bored looking at the same content , do you have a collection of advertising links you would like to display and gain revenue from . Here is a simple script that may help you out , to see the link change in the example simply refresh your browser.

Code

<?php
$urls = array("http://asp.myscripting.com" ,
"http://vbscript.myscripting.com" ,
"http://javascript.myscripting.com" );
$titles = array("ASP site" ,
"VBScript site" ,
"Javascript site");
//generate a random number
srand(time());
$random = (rand()%3);
//display link
echo ("<a href = \"$urls[$random]\">$titles[$random]</a>");
?>


Example

Javascript site