Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] file_get_contents - pobieranie url z formularza
kuzniarski1996
post
Post #1





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 18.12.2015

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


Witam serdecznie, nie mogę sobie poradzić z kodem, mianowicie chodzi o to aby w miejscu gdzie znajduje się adres url, wstawić url z pola input, dokładniej: mam pole formularza w którym wpisuje url, przyciskam dalej i ma mi pokazać pobraną treść z linku który wkleiłem.

  1. <?php
  2. $content = file_get_contents('http://torrenty.org/torrent/1230967');
  3. preg_match ('[<div class="tytul_gora">(.+?)</div>]', $content, $wynik);
  4. print_r($wynik[0]);
  5. ?>

Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 559
Pomógł: 6315
Dołączył: 27.12.2004




file_get_contents($_POST['pole_z_posta']);
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: 5.10.2025 - 01:48