Wednesday, June 18, 2008

Random URL

Display random url with Title and Description of URL

<?

$random_url = array("http://www.apniphp.blogspot.com/",

"http://www.worldit-news.blogspot.com/",

"http://www.funzclub.blogspot.com/",

"http://www.karachicorner.blogspot.com/",

"http://www.islamic-information.blogspot.com/",

"http://www.smspk.zxq.com/",

"http://www.jokes.zxq.com/");


$url_title = array("Free PHP Scrips",

"World Information Technology News",

"Fun 4 Every 1",

"Get Inforamtion about Karachi, Pakistan",

"About ISLAM",

"SMS Collection",

"Jokes Collection");

$url_desc = array("- A complete solution of PHP Scripts",

"- Get the latest invention in Information Technology",

"- Funny Pictures, Cartoons and many more funny links",

"- About Karachi",

"- Islamic Infomation",

"- Send Free SMS to your Friends",

"- Submit your Jokes, Send jokes to your Friends");

srand(time());

$sizeof = count($random_url);

$random = (rand()%$sizeof);

print("<center><a href=\"$random_url[$random]\">$url_title[$random]</a> $url_desc[$random]</center>");

?>

No comments: