cURL在此服务器上找不到请求的URL /api/process.php

时间:2011-08-19 02:11:56

标签: php ssl curl

  

可能重复:
  cURL Requested URL /api/process.php was not found on this server

我使用cURL为客户创建了一个API。我刚刚移动到这个域的新服务器,现在api不起作用。一切似乎都是明智的工作模式,但我不能让它工作:

这是我得到的回应。

Array ( 
[url] => https://www.1800pay.com/api/process.php 
[content_type] => text/html; charset=iso-8859-1 
[http_code] => 404 
[header_size] => 179 
[request_size] => 506 
[filetime] => -1 
[ssl_verify_result] => 0 
[redirect_count] => 0 
[total_time] => 0.038607 
[namelookup_time] => 0.002688 
[connect_time] => 0.002737 
[pretransfer_time] => 0.038372 
[size_upload] => 0 
[size_download] => 294 
[speed_download] => 7615 
[speed_upload] => 0 
[download_content_length] => 294 
[upload_content_length] => 0 
[starttransfer_time] => 0.038597 
[redirect_time] => 0 )

卷曲错误:

  

未找到

     

在此服务器上找不到请求的URL /api/process.php。

     

Apache / 2.2.3(CentOS)服务器,网址为:www.1800pay.com,端口44

使用代码:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.1800pay.com/api/process.php");
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
//curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POSTFIELDS, $output_transaction);
curl_setopt($ch, CURLOPT_POST, 1);

if (!($data = curl_exec($ch))) {print_r(curl_error($ch));echo "error";
return ERROR;
}
print_r(curl_getinfo($ch));
 echo 'Curl error: ' . curl_error($ch);
curl_close($ch);

print_r($data);

感谢您的帮助:)

0 个答案:

没有答案