Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][cURL] preg_match
Trecco
post
Post #1





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 11.08.2009

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


Witam, mam mały problem ze skryptem, niby wszystko śmiga, ale pokazuje mi się ten błąd:
  1. Warning: preg_match() expects at least 2 parameters, 1 given in /home/trecco/public_html/test.php on line 9

na początku lini, na dole pokazuje wszystko tak jak ma być, oto kod:

  1. <?php
  2. $qwe = '/<html>(.+?)</html>/';
  3. $curl = curl_init();
  4. curl_setopt($curl, CURLOPT_HEADER, 0);
  5. curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  6. curl_setopt($curl, CURLOPT_VERBOSE, 1);
  7. curl_setopt($curl, CURLOPT_REFERER, 'http://strona.pl');
  8. curl_setopt($curl, CURLOPT_URL, 'http://strona.pl/sb.htm');
  9. preg_match($qwe);
  10. $google = curl_exec($curl);
  11. print_r($google);
  12. curl_close($curl);
  13. ?>


I jeszcze jedno, jak ściągnąć do pokazanego wyniku kod css?

Ten post edytował Trecco 25.02.2010, 02:27:57
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: 21.08.2025 - 05:19