This script is useful for those who have no database access. Use just a few lines of this PHP code to output a random banner or random link into your HTML page.
This script is useful for those who have no database access. Use just a few lines of this PHP code to output a random banner or random link into your HTML page.$codes = array(
"<a href=roseindia.net><img src=banner1.gif></a>",
"<a href=newstrackindia.com><img src=banner2.gif></a>",
"<a href=javajazzup.com><img src=banner3.gif></a>"
); br>
It should contain the set of all possible codes to show on the page. while(list(, $code) = each($codes)) {
echo "$code";
}
You can use this simple rotating mechanism for placing links, banners, or
just any text. I used the code shown below to output two of three possible links
on the page:
<html>
<body>
Check out these links:<br>
<?
$codes = array(
& "<a href=roseindia.net><img src=banner1.gif></a>",
"<a href=newstrackindia.com><img src=banner2.gif></a>",
"<a href=javajazzup.com><img src=banner3.gif></a>"
);br>
shuffle($codes);
$i=0;
$number=2; while(list(, $code) = each($codes)) {
if ($i>=$number) { break; }
echo "$code";
echo '<br>';
$i++;
}
?>
</body></html>
OOf course this script can't show you the number of views for each link.
But with some cool modifications (writing the number of views into a file) you
can create your own advanced banner rotation software and sell it to someone.