我使用此代码从网站pj.ma/pagesjaunes
获取姓名和电话,但在执行时会出错,可以帮忙吗?
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.pj.ma/pagesjaunes");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "pro_quiquoi=britel&pro_ou=casablanca&x=85&y=35");
$output=curl_exec($ch);
curl_close($ch);
echo $output;
?>