Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Pobieranie danych z innej strony
TheDuliMen
post
Post #1





Grupa: Zarejestrowani
Postów: 33
Pomógł: 0
Dołączył: 30.06.2012

Ostrzeżenie: (10%)
X----


  1. <?php
  2. $strona = file_get_contents("http://racegame.pl/profile.php?user=768");
  3. preg_match('#Ranking\n*\s*(\d*)#', $strona, $tablica);
  4. $dane = $tablica[1];
  5.  
  6. echo '$dane';
  7. ?>


Dlaczego to nie chodzi?

Ten post edytował TheDuliMen 2.07.2012, 19:26:12
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
TheDuliMen
post
Post #2





Grupa: Zarejestrowani
Postów: 33
Pomógł: 0
Dołączył: 30.06.2012

Ostrzeżenie: (10%)
X----


Cytat(pitu120 @ 2.07.2012, 20:45:12 ) *
Masz błąd w linku, pewnie dlatego.

Zamiast http:// masz http//


Ale przed moim postem że znowu błąd użyłem tego kodu
  1. <?php
  2.  
  3. $strona = file_get_contents("http://racegame.pl/profile.php?user=768");
  4. preg_match('#Ranking\n*\s*(\d*)#', $strona, $tablica);
  5. print_r($tablica);
  6.  
  7. ?>


Ten post edytował TheDuliMen 2.07.2012, 19:53:37
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: 23.12.2025 - 04:45