Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP/CURL]Skrypt logowania potrzebne odswierzanie, Odswierzanie
-Abak-
post
Post #1





Goście







Witam zrobilem skrypt ktory loguje na jeden portal z mojej strony i chcem zeby odswiezalo jedna z pod stron tego portalu tylko kompeletnie nie mam pojecia jak to zrobic prosze o pomoc
Go to the top of the page
+Quote Post
-Anonymous-
post
Post #2





Goście







<META http-equiv="Refresh" content="120">
Założona wartość "120" to liczba sekund dzieląca kolejne odświeżenia strony.

PS: Skrypt powinien znajdować się pomiędzy znacznikami <head> i </head>
Go to the top of the page
+Quote Post
-Abak-
post
Post #3





Goście







to bedzie dzialalo w curlu (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
Go to the top of the page
+Quote Post
b4x
post
Post #4





Grupa: Zarejestrowani
Postów: 658
Pomógł: 95
Dołączył: 20.12.2005
Skąd: N54,35° E18,63° (Gdańsk)

Ostrzeżenie: (0%)
-----


  1. <?php
  2. $max = 1000; // ile razy ma pobrać stronę.
  3.  
  4. $url = 'http://jakas-strona.pl'; // adres strony.
  5.  
  6. for($i=0;$i<$max;$i++) {
  7.  
  8. $ch = curl_init($url);
  9. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  10. curl_setopt($ch, CURLOPT_HEADER, 1);
  11. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  12. curl_setopt($ch, CURLOPT_TIMEOUT, 15);
  13. curl_setopt($ch, CURLOPT_POST, 0);
  14. $html = curl_exec($ch);
  15. curl_close ($ch);
  16. }
  17. ?>


Prościej można to zrobić za pomocą file_get_contents" title="Zobacz w manualu PHP" target="_manual

  1. <?php
  2. $max = 1000; // ile razy ma pobrać stronę.
  3.  
  4. $url = 'http://jakas-strona.pl'; // adres strony.
  5.  
  6. for($i=0;$i<$max;$i++) {
  7.  
  8.  
  9. }
  10. ?>


Ten post edytował b4x 10.07.2008, 18:43:33
Go to the top of the page
+Quote Post

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: 21.12.2025 - 18:17