卷曲请求的URL /api/process.php在此服务器上找到 [英] cURL Requested URL /api/process.php was not found on this server

查看:146
本文介绍了卷曲请求的URL /api/process.php在此服务器上找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了使用cURL客户的API。我刚搬到一个新的服务器这个领域现在的API犯规不起作用。一切似乎是明智工作的罚款模块,但我无法得到它的工作:

I created an API for customers using cURL. I just moved to a new server this domain and now the api doesnt not work. Everything seems to be working fine modules wise but I can't get it to work:

这是我得到的回应。

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 )
Curl error:

Not Found

The requested URL /api/process.php was not found on this server.

Apache/2.2.3 (CentOS) Server at www.1800pay.com Port 443

$ C $用于C:

CODE USED:

$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);

感谢您的帮助:)
是的文件存在于服务器.....:|

Thanks for the help :) And YES THE FILE EXISTS ON THE SERVER..... :|

推荐答案

我不知道你的问题是什么,但是当我尝试使用这种卷曲的网址:

I'm not sure what your problem is but when I try to curl the URL using this:

function curl_get($url)
    {
        $curl_handle = curl_init();
        curl_setopt($curl_handle, CURLOPT_URL, $url);
        curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
        curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, FALSE);
        curl_setopt($curl_handle, CURLOPT_COOKIEJAR, "cookie.txt");
        curl_setopt($curl_handle, CURLOPT_COOKIEFILE, "cookie.txt");
        //curl_setopt($curl_handle, CURLOPT_USERPWD, $co.":".$apikey);
        curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($curl_handle, CURLOPT_DNS_USE_GLOBAL_CACHE, FALSE);
        $buffer = curl_exec($curl_handle);
        $error = curl_error($curl_handle);
        curl_close($curl_handle);
        //if (empty($buffer)) 
            //echo "No response from server: ".$error;
        //else 

        return $buffer;
    }

我得到这样的:

错误[code:1043]支付()键 - 不正确的数据。

Error [Code:1043] Payment ()Key - incorrect data

这篇关于卷曲请求的URL /api/process.php在此服务器上找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆