ScriptPlazzaon Google+

This little PHP snippet will display your advertisement links randomly every time the user re-loads the page.

<?php
$link[1] = 'link 1';
$link[2] = 'link 2';
$link[3] = 'link 3';
$link[4] = 'link 4';
$link[5] = 'link 5';

$adCount = count($link);
$randomAdNumber = mt_rand(1, $adCount);
echo $link[$randomAdNumber];
?>
Source: http://www.tech-evangelist.com/2007/08/03/php-banner-ad-script/
 

Leave a Comment

You must be logged in to post a Review.