
12.12.2009, 19:05
|
|
Постоянный
Регистрация: 07.03.2008
Сообщений: 479
Провел на форуме: 791766
Репутация:
61
|
|
Сообщение от b3
http://ua2.php.net/curl
http://ua2.php.net/manual/en/curl.installation.php
PHP код:
<?php
$ch = curl_init('http://ya.ru/');
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.4) Gecko/2008102920 AdCentriaIM/1.7 Firefox/3.0.4');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$res = curl_exec($ch);
if(preg_match_all("/<td class=\"td3\">([0-9]{0,4})<\/td>/is", $content, $matches))
echo $matches[1];
?>
А всякими fread нельзя?
|
|
|