2. 使用CONTEXT添加HTTP的Accept头来声明自己只支持WAP网页
3. <?php
$opts = array(
'http' => array(
'method' => "GET" ,
'header' => "Accept: text/html,application/xhtml xml,application/xml;q=0.9,*/*;q=0.8,text/vnd.wap.wml;q=0.6\r\n"
)
);
$context = stream_context_create ( $opts );
echo file_get_contents ('
http://www.example.com' , false, $context);
?>