Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Problem z wyswietlaniem po cURL
Mylek
post
Post #1





Grupa: Zarejestrowani
Postów: 30
Pomógł: 0
Dołączył: 17.03.2010

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


Witam.

Mam mały problem z pewnym skryptem który wykorzystuje bibliotekę cURL.
Kod:
  1. <?php
  2. $curl = curl_init();
  3. curl_setopt($curl, CURLOPT_URL, "http://www.google.pl/");
  4. curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  5. $zawartosc_strony = curl_exec($curl);
  6. curl_close($curl);
  7. $wiersz_strony = explode("\n",$zawartosc_strony);
  8. echo $wiersz_strony[5]."<br />";
  9. if(eregi("google", $wiersz_strony[5]))
  10. {
  11. echo "tak";
  12. }
  13. ?>

po wykonaniu wyświetlenia wiersza nic inne parametry echo nie są wyświetlane:
  1. echo $wiersz_strony[5]."<br />";

Sprawdzałem w kodzie strony i reszta wyświetleń znajduje się w:
  1. <script>(function(){<br />tak</script>


Wie ktoś jak zaradzić temu??
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
expert
post
Post #2





Grupa: Zarejestrowani
Postów: 211
Pomógł: 4
Dołączył: 29.10.2008

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


Szczerze? Nie bardzo rozumiem o co Ci chodzi? W efekcie działania kodu w źródle mam taki tekst:
Kod
;google.neegg=1;google.y.first.push(function(){google.ac.i(document.f,document.f.q,'','','',{o:1,sw:1});google.History&&google.History.initialize('/')});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);google.fade=null;}</script></div><script>(function(){<br />tak


A na stronie wyświetla mi się:

Kod
;google.neegg=1;google.y.first.push(function(){google.ac.i(document.f,document.f.q,'','','',{o:1,sw:1});google.History&&google.History.initialize('/')});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);google.fade=null;}


Sprecyzuj o co chodzi.
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: 22.08.2025 - 14:07