اینم یه کد دیگه که خیلی هم بهتر از کد اول هستش ولی 2 فایل لازم داره که باید تو پوشه روت سایت قرار بگیره
فایل هایی که لازم داری را پیوست کردم
از پیوست دانود کن و پسوندش را (تکه ی اخر فایل را که .txt هست پاک کن که پسوند بشه .inc و در پوشه ی روت سایتت قرار بده
اون کد پی اچ پی که بالا اوردم را هم در صفحه نمایش سایت جایی که قراره بنر به صورت رندوم نمایش داده بشه قرار بده
تویه فایل linkcode.inc هم ادرس بنر ها را میزاری مثل نمونه برا نمونه 4 تا ادرس بنر گذاشتم توش (البته هر 4 تا 1 لینک هست نمونه بود)
اگر برای وردپرس استفاده میکنی یه ویدگت که پی اچ پی را هم میخونه باید به صورت پلاگین اضافه کنی و کد را توی اون میزاری
برای جای دیگه ای هم استفاده میکنی این کد را به جای کد بنرت باید قرار بدی (تو وردپرس چون باید به عنوان پی اچ پی خونده بشه باید اون کار که گفتم را کرد)
کد PHP:
<?PHP
/* Config Part --------------------------------------------------------------------------------------------------------------*/
error_reporting('0');
$directory = "";
///enter/your/website/root/
// Webserver path to your adrotator files
$linkfile = "linkcode.inc"; // The Link Code file
$adcountfile = "displayad.inc"; // The Ad Display file
$pos = "center"; // Postion of banner tag (left, center or right)
$help_msg = "Yes"; // Display a "Help Message" - "Yes" to enable!
$help_message = "Please support this site by Buy !"; // Enter "Help Message" here
/* End of Config Part -------------------------------------------------------------------------------------------------------*/
// Leave below this line alone - If you modify anything below I can assure you it will mess up!
// the file holding the advert number to view next
$num = file($directory.$adcountfile);
// the file holding the link codes
$adverts = file($directory.$linkfile);
// tells the script to look at the next item in the array
$num = $num[0]+1;
// counting the number of adverts - using function count()
$number = count($adverts);
// If ran out of adverts, start again!
if($num>$number-1){
$num=0;
}
// write the current number to the file
if (file_exists($directory.$adcountfile)) {
$nu = fopen ($directory.$adcountfile, "w");
fputs($nu,$num);
fclose($nu);
}
else {
die("");
}
// display the link on the page
if($help_msg == "yes"){
echo "{$pos_statag}<small>$help_message</small>{$pos_endtag}";
}
echo "$adverts[$num]";
?>
برا این که بنر لینک دار بتونی بزاری تو فایلی که گفتم باید تو هر خط به جای تصویر تنها این کد را که لینک و اندازه و.. هم توش لحاظ شده اینجوری بزاری
یعنی کد زیر بشه 1 بنر ( هر بنر هم در 1 خط میزاری
کد:
<a rel="nofollow" href="http://www.filejungle.com/p-sales-mCOz2ukEoy4-" target="_blank"><img src="http://www.filejungle.com/images/banner/Premium300_250b.gif" alt="FileJungle" title="FileJungle" height="250" border="0" width="307"></a>
امیدوارم فهمیده باشید چی میگم و بتونه بهت کمک کنه
سوال داشتی یا اگه گیجت کردم پیغام خصوصی بهم بده تا کمکت کنم
دکمه ی تشکر هم پایین پسست برای تشکر موجود است 
موفق باشی