Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 335 Pomógł: 0 Dołączył: 15.11.2003 Ostrzeżenie: (0%)
|
.
Ten post edytował Chewolf 16.10.2007, 18:22:45 |
|
|
|
![]() |
Post
#2
|
|
|
Grupa: Przyjaciele php.pl Postów: 1 789 Pomógł: 41 Dołączył: 30.10.2003 Skąd: Wrocław Ostrzeżenie: (0%)
|
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... |
|
|
|
Chewolf . 26.03.2004, 19:31:11
HaRy a jezeli usuniesz klucz "2", a rand() "przypadkiem... 26.03.2004, 19:50:37
HaRy zreszta ... w przypadku duuuzej ilosci banerow wyg... 26.03.2004, 19:57:46
Chewolf Napisałem prosty ! dawno ten mały skrypcik napi... 26.03.2004, 20:49:51 ![]() ![]() |
|
Aktualny czas: 26.12.2025 - 12:56 |