Your answer can be found at glados.cc/myfaucet.
there is a script to download there that has the code you are looking for here is a quick overview: create a config.php file and put this inside:
<?php // Advertisement Codes // All ads rotate. There are 3 types: square, text, and banner. Add HTML code to the array $squareAds = array('<iframe scrolling="no" style="border: 0; width: 250px; height: 250px;" src="http://myadserver.com"></iframe>'); $textAds = array('<p><strong><a href="http://yoururl.com">YourURL</a></strong></p>', '<p><strong>Get your own site</strong> <a href="http://yoursite.com">here</a></p>'); $bannerAds = array('<iframe scrolling="no" style="border: 0; width: 468px; height: 60px;" src="http://youradserver.com"></iframe> '); ?>
Then on the page where you, say, index.php, show your random links or images or text, simply put:
<?php require_once('config.php'); function getAd($arr){ return $arr[rand(0, count($arr)-1)]; } echo "any plain text or html" . getAd($textAds) . "any plain text or html" . getAd($bannerAds) . "any plain text or html" . getAd($squareAds) . "any plain text or html"; ?>
Of course, you can create as many $ xxxAds arrays and name them as you want, and you can fill the arrays with any displayed html or jscript, as well as an unlimited number for each array in csv format, you can also create as many new getAd functions with different names to you could run multiple unique iframes on the same page
source share