Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Rotator banerów, odśwież co 20 sek.
-Garbacz-
post
Post #1





Goście







Witam, czy można stworzyć prosty rotator banerów z częstotliwością odświeżania 20 sekunk??

Czyli co 20 sekund jest nowy baner??

Czy można to zrobić bez bazy mysql??

samo czyste php??
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
-Guest-
post
Post #2





Goście







Błąd

Kod
Parse error: parse error in c:\usr\krasnal\www\eurobarre\ebay.php on line 58



KOD:

  1. <?php
  2. // rotator banerow
  3.  
  4. $array[1] = '<script language="javascript">
  5. var uri = 'http://imppl.tradedoubler.com/imp/img/16173458/1184633?' + new String (Math.random()).substring (2, 11);
  6. document.write('<a href="http://clk.tradedoubler.com/click?p=39590&a=1184633&g=16173458" target="_blank"><img src="'+uri+'" border=0></a>');
  7. </script>';
  8.  
  9. $array[2] = '<script language="javascript">
  10. var uri = 'http://imppl.tradedoubler.com/imp/img/1128784/1184633?' + new String (Math.random()).substring (2, 11);
  11. document.write('<a href="http://clk.tradedoubler.com/click?p=22131&a=1184633&g=1128784" target="_blank"><img src="'+uri+'" border=0></a>');
  12. </script>';
  13.  
  14. $array[3] = 'bannerek 3';
  15. $array[4] = 'bannerek 4';
  16. $array[5] = 'bannerek 5';
  17.  
  18. $czas = 5; // 5 sekund
  19.  
  20. $url = (int)$_GET['x'];
  21.  
  22. if ( empty ( $url ) or $url >= count ( $array ) )
  23. {
  24. $url = 1;
  25. }
  26. else
  27. {
  28. $url++;
  29. }
  30. echo $array[$url];
  31.  
  32. header( "Refresh: " . $czas . "; URL=?x=" . $url );
  33.  
  34. ?>


(IMG:http://forum.php.pl/uwaga.gif)
~mike_mech
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 18.10.2025 - 06:50