<a href="http://www.mastersite.org.ua/"><IMG SRC="http://www.mastersite.org.ua/"alt="Мой баннер" border="0"></a>
// указываем полный путь к каталогу в котором находятся наш файл-база баннеров и файл в который будет записываться количество показов баннеров.
$directory = "/var/www/your_site/banners/";
// название файла с баннерами ( их кодом)
$linkfile = "links.inc";
// название файла для записи количества показов
$adcountfile = "display.inc";
// позиционирование баннера ( тэг "align" ) т.е. center , right и так далее ...
$pos = "left";
// файл содержащий число показов
$num = file($directory.$adcountfile);
// файл содержащий код баннеров
$adverts = file($directory.$linkfile);
// берем следующий баннер
$num = $num[0]+1;
//считаем баннеры используя функцию count()
$number = count($adverts);
// если прошли все баннера - начинаем показ снова
if($num>$number-1){
$num=0;
}
// записываем число в файл
if (file_exists($directory.$adcountfile)) {
$nu = fopen ($directory.$adcountfile, "w");
fputs($nu,$num);
}
else {
die("Нет файла ($adcountfile) ($linkfile) ($directory) ");
}
// выводим сам баннер
echo "
$adverts[$num]
";
Zeytinburnu Evden Eve - 31-12-23 10:12:29
Undeniably believe that which you said. Your favorite reason seemed
to be on the net the simplest thing to be aware of. I say to you, I
certainly get irked while people think about worries that they plainly do not know about.
You managed to hit the nail upon the top as well as defined out the whole thing without having side effect , people can take a signal.
Will likely be back to get more. Thanks