1.file_get_contents伪造user_agent
$UserAgent = 'Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/14.0.2';
ini_set('user_agent', $UserAgent);
2.curl伪造user_agent
$user_agent = "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; zh-cn) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5"; curl_setopt($c, CURLOPT_USERAGENT, $user_agent);
for example: