hugowan
8/15/2013 - 6:45 PM

gistfile1.php

<?php

$url = 'http://t.hk.qq.com/index.php/u/janetchow0825';
$agent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)';

$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_URL,$url);
$result = curl_exec($ch);
// var_dump($result);

preg_match('/<div class=\"fright\">.*?<\/span>/s', $result, $matchs);

// var_dump($matchs);

echo trim(strip_tags($matchs[0]));