php中的cURL得到404,浏览器得到OK

php中的cURL得到404,浏览器得到OK,php,curl,Php,Curl,我需要脚本(php)的帮助 我尝试通过curl在以下地址发送服务: 使用浏览器我可以打开它,但是如果我通过cURL尝试,我只能得到404-找不到 如果我离开8090端口,cURL可以工作,但当然找不到服务 $url = 'http://xxxxxx.firewall-gateway.com:8090/avswcf.svc/GetProdInfoList'; $ch = curl_init($url); //The JSON data. $jsonData = array( 'It

我需要脚本(php)的帮助 我尝试通过curl在以下地址发送服务:

使用浏览器我可以打开它,但是如果我通过cURL尝试,我只能得到404-找不到

如果我离开8090端口,cURL可以工作,但当然找不到服务

$url = 'http://xxxxxx.firewall-gateway.com:8090/avswcf.svc/GetProdInfoList';

$ch = curl_init($url);


//The JSON data.
$jsonData = array(
    'Items' => array(
        'PZN' => 1287400
    ),
    'Password' => 'xxxxx',
    'User' => 'avsweb'
);

$jsonDataEncoded = json_encode($jsonData);

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); 
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0"); 
$result = curl_exec($ch);

这个URL有任何授权吗?可能有很多东西,可能请求中需要cookie,或者需要跟随重定向。。能否在浏览器中检查网络呼叫并发布请求/响应标题?如何使用浏览器发送帖子?404可能意味着在POST数据中找不到请求的资源。换句话说,GET可以工作,但POST失败。