php旋度模拟浏览器?

php旋度模拟浏览器?,php,curl,Php,Curl,当我们发送邮件时,我们有下一个标题: POST http://www.autonavigator.ru/dispatcher.pl HTTP/1.1 Host: www.autonavigator.ru Connection: keep-alive Content-Length: 55 Origin: http://www.autonavigator.ru X-Request: JSON User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleW

当我们发送邮件时,我们有下一个标题:

POST http://www.autonavigator.ru/dispatcher.pl HTTP/1.1
Host: www.autonavigator.ru
Connection: keep-alive
Content-Length: 55
Origin: http://www.autonavigator.ru
X-Request: JSON
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36
Content-type: application/x-www-form-urlencoded; charset=UTF-8
Accept: application/json
X-Requested-With: XMLHttpRequest
Referer: http://www.autonavigator.ru/my/offer_add/
Accept-Encoding: gzip,deflate
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4
Cookie: region_id=45; city_id=22; user_name=rora%40gmail.com; user_type=user; user_offer_count=1; user_message_count=0; user_no_confirm=1; session_id=WR9q4d41DgD7biTOOsMzgtXfJm83VFQn; USession=WR9q4d41DgD7biTOOsMzgtXfJm83VFQn; _ym_visorc_5781676=b

class=list&method=make&show_all=1&vehicle=car&type=used
我想用curl模拟浏览器

为此,我使用下一个代码:

但结果我们得到了一些错误()


请告诉我代码中的错误在哪里,正确的方法是什么?

很可能内容是gzip,因此您只需执行以下操作:

curl_setopt($ch,CURLOPT_ENCODING , "gzip");
curl_setopt($ch,CURLOPT_ENCODING , "gzip");