Шаг №1. - создаем файл под названием index.php - в любой папке, в данном случае это папка reclama
Код: Выделить всё
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /><meta http-equiv="refresh" content="5; URL=http://yoursite.com/reclama/index.php"><?php$ourFile = fopen("bannerlist.txt", "r");for ($i=0; $s=fgets($ourFile, 10000); $i++) {if (mt_rand(0, $i) == 0) $line = $s;}echo $line;?>
Пример содержимого файла bannerlist.txt
Код: Выделить всё
<a href="http://vkontakte.ru/appXXX" target=_blank><img src="http://XXX.com/1.png" border="0" title="ololoolololo" width=650 height=120></a><a href="http://vkontakte.ru/appXXX" target=_blank><img src="http://XXX.com/3asd6.gif" border="0" title="Бугага баннер2" width=150 height=100></a>
Код: Выделить всё
<iframe width="650" allowtransparent="yes" style="background: transparent;" border="0" height="200" frameborder="0" scrolling="no" src="http://yoursite.com/reclama/index.php"> </iframe>