<?php
//
// Simple Ad Rotator
//
$adfile = file_get_contents('ads.txt');
$ads = array();
$ads = explode("||AD_DIVIDER||", $adfile);
$count = count($ads);
$rand = rand(0, $count-1);
echo $ads[$rand];
?>Yukarıdaki kodu reklam.php diye kaydedin. sonra da aynı dizine ads.txt diye başka bir dosya oluşturun. ads.txt içine her reklam kodundan sonra
||AD_DIVIDER||
yazarak reklamlarınızı ekleyin. Dönüşümlü olarak yer alacaktır.
Aşağıdaki örneğe bakabilirsiniz:
<div align=left><script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxxxxx";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "333333";
google_color_bg = "000000";
google_color_link = "FFFFFF";
google_color_url = "999999";
google_color_text = "CCCCCC";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
||AD_DIVIDER||
<!-- PayPopup.com Advertising Code Begin -->
<script language="JavaScript">
<!--
//frequency cap,1 pop-under per number of hours
var frequencyCap = 0; //hours
function setCookie(cookieName,cookieValue, expirehours) {
if (frequencyCap > 0){
var today = new Date();
var expire = new Date();
expire.setTime(today.getTime() + 3600000 * frequencyCap);
document.cookie = cookieName+"="+escape(cookieValue)
+ ";expires="+expire.toGMTString() + "; path=/";
}else{
document.cookie = cookieName+"="+escape(cookieValue) + "; path=/";
}
}
function ReadCookie(cookieName) {
var theCookie=""+document.cookie;
var ind=theCookie.indexOf(cookieName);
if (ind==-1 || cookieName=="") return "";
var ind1=theCookie.indexOf(';',ind);
if (ind1==-1) ind1=theCookie.length;
return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}
if (ReadCookie('PayPopupAds') != 'yes')
{
setCookie('PayPopupAds','yes', frequencyCap);
//Pop-Under Code Here
document.write('<SCRI'+'PT LANGUAGE="JavaScript1.1" ');
document.write(' SRC="http://popunder.PayPopup.com/popup.php?id=jcink&pop=enter&t=5&subid=29340&blk=1">');
document.write('</SCR'+'IPT>');
//Pop-Under Code End
}
// -->
</script>
||AD_DIVIDER||
BAŞKA Bİ REKLAM KODU DAHASon olarak tek yapmanız gereken reklamınızın çıkmasını istediğiniz yere eğer bu bir php dosyasıysa include etmek, html ise iframe ile çağırmaktır.

zor yukledım