Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]CURL - problem
Wertas
post
Post #1





Grupa: Zarejestrowani
Postów: 45
Pomógł: 0
Dołączył: 2.03.2010

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


Witam. Proszę wypróbować skrypt
  1. <link type="text/css" rel="stylesheet" href="states.css">
  2. <?php
  3.  
  4. $cookie_file = "cookie.txt";
  5. $headers = array('Accept-Language: pl,en-us;q=0.7,en;q=0.3',
  6. 'Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7');
  7.  
  8. $ch = curl_init('http://www.empcraft.pl/auth/login');
  9. curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12;MEGAUPLOAD 1.0");
  10. curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
  11. curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
  12. curl_setopt($ch, CURLOPT_POST, 1);
  13. curl_setopt($ch, CURLOPT_POSTFIELDS, 'login=xxxx&password=xxxx');
  14. curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  15. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  16. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  17. $s = curl_exec($ch);
  18.  
  19.  
  20. curl_close($ch);
  21.  
  22. $ch = curl_init("http://s1.empcraft.pl/executeStat.do?operation=statHero");
  23. curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
  24. curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
  25.  
  26.  
  27. $output = curl_exec($ch); // Run curl
  28.  
  29. curl_close($ch);
  30.  
  31.  
  32. die($output);
  33.  
  34.  
  35. ?>


Plik css http://hotfile.com/dl/90507824/0868401/states.css.html


Tutaj zdjęcie 1 : http://i7.photobucket.com/albums/y287/Reno...aft/artwork.png
Tutaj zdjęcie 2 : http://i7.photobucket.com/albums/y287/Reno...0cRaft/1a1d.png

Już porostu nie mogę sprawdzałem str, substr i parę innych i nie mogę pobrać tej tabeli. Jestem zupełnie zielony w sprawach substr itp.

Nie mogę rozwiązać tego proszę o pomoc (IMG:style_emoticons/default/sad.gif)

Ten post edytował batman 19.12.2010, 19:47:15
Powód edycji: [batman]: zdajesz sobie sprawę, że podałeś login i hasło do konta?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Wertas
post
Post #2





Grupa: Zarejestrowani
Postów: 45
Pomógł: 0
Dołączył: 2.03.2010

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


Cytat(batman @ 19.12.2010, 19:48:09 ) *
Pozwól, że zapytam. Jaki chcesz osiągnąć końcowy efekt?



Przedstawiony skrypt ma mi utworzyc tabele na nowo tyle ze czysta moze do arraya sprowadzona. Zebym mogl ja przetwarzac.

Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 16.10.2025 - 09:15