Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Pobranie treści innej strony
-ordon-
post
Post #1





Goście







Dzień dobry.

Zwracam się z prośbą o pomoc w trzy liniowym kodzie. Siedzę już nad tym od przedpołudnia masa przeczytanych poradników manual, forum php.pl i dalej nie wiem jak naprawić usterkę.

  1. <?php
  2. $a = file_get_contents("http://strona.pl/str.html");
  3. preg_match_all('<b id="info">(.*)</b>', $a, $b);
  4. ?>


var_dump zwraca mi wartość NULL a błędy to błędy jakie otrzymuje:
Cytat
Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in xxxx on line 2

Warning: file_get_contents(http://strona.pl/str.html) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in xxxx on line 2

Warning: preg_match_all() [function.preg-match-all]: Unknown modifier '(' in xxxx on line 3



strona.pl... to tylko taki podkład.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
wookieb
post
Post #2





Grupa: Moderatorzy
Postów: 8 989
Pomógł: 1550
Dołączył: 8.08.2008
Skąd: Słupsk/Gdańsk




Tzn, że twój serwer zablokował pobieranie innych stron za pomogą file_get_contents
Go to the top of the page
+Quote Post
lobopol
post
Post #3





Grupa: Zarejestrowani
Postów: 1 729
Pomógł: 346
Dołączył: 4.04.2009

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


Użyj curla
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: 25.08.2025 - 12:05