cURL Requested URL /api/process.php was not found on this server

前端 未结 2 2016
时光取名叫无心
时光取名叫无心 2021-01-26 15:02

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\'

相关标签:
2条回答
  • 2021-01-26 15:07

    The answer is within the response.. a not found error is exactly that. Just make sure the file api/process.php exists on the new domain.

    0 讨论(0)
  • 2021-01-26 15:11

    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;
        }
    

    I get this:

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

    0 讨论(0)
提交回复
热议问题