Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Curl i wyrażenia regularne
Otto
post
Post #1





Grupa: Zarejestrowani
Postów: 144
Pomógł: 7
Dołączył: 22.03.2010

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


Witam postanowiłem spróbować wyciągnąć dane z przykładowej strony ale napotkałem problem...

  1. $curl = curl_init();
  2. curl_setopt($curl, CURLOPT_URL, "http://diff-anime.pl/index.php");
  3. curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  4. $strona = curl_exec($curl);
  5. preg_match_all("/<div class='ostatnio_dodane odbg'>(.*?)<\/div><\/div>/", $strona, $wyniki);
  6. print_r($wyniki);
  7. curl_close($curl);


Zwracane wyniki to
  1. (
  2. [0] => Array
  3. (
  4. )
  5.  
  6. [1] => Array
  7. (
  8. )
  9.  
  10. )


Jednak nie wiem w czym problem... Takie dane na pewno istnieją na tej stronie.
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: 19.08.2025 - 20:31