A ja bym to zrobił tak:
banners.txt
Kod
http://strona.com.pl||http://strona.com.pl/banner.jpg||
http://strona.com.pl||http://strona.com.pl/banner.jpg||
http://strona.com.pl||http://strona.com.pl/banner.jpg||
http://strona.com.pl||http://strona.com.pl/banner.jpg||
http://strona.com.pl||http://strona.com.pl/banner.jpg||
http://strona.com.pl||http://strona.com.pl/banner.jpg||
banners.php
[php:1:60a04808ad]<?php
$File = file('banners.txt');
$i = array_rand($File);
$Site = explode("||", $File[$i]);
// $Site[0] - adres strony
// $Site[1] - banner strony
echo '<a href="'.$Site[0].'" target="_blank"><img src="'.$Site[1].'" border="0"></a>';
?>[/php:1:60a04808ad]
Chyba lepiej aby bannery zapisywał w pliku aniżeli modyfikował kod w celu dodania bannera...