Hi i am using XE converter api and need to fetch data from the url, my code so far is
$new_url = "https://xecdapi.xe.com/v1/account_info/";
$getData = CurlSendPostRequest($new_url);
print_r($getData);
function CurlSendPostRequest($url)
{
        $ch = curl_init($url);
        $options = array(
                CURLOPT_RETURNTRANSFER => true,         // return web page
                CURLOPT_HEADER         => false,        // don't return headers
                CURLOPT_FOLLOWLOCATION => false,         // follow redirects
               // CURLOPT_ENCODING       => "utf-8",           // handle all encodings
                CURLOPT_AUTOREFERER    => true,         // set referer on redirect
                CURLOPT_CONNECTTIMEOUT => 20,          // timeout on connect
                CURLOPT_TIMEOUT        => 20,          // timeout on response
                CURLOPT_POST            => 1,            // i am sending post data
                CURLOPT_POSTFIELDS     => null,    // this are my post vars
                CURLOPT_SSL_VERIFYHOST => 0,            // don't verify ssl
                CURLOPT_SSL_VERIFYPEER => false,        //
                CURLOPT_VERBOSE        => 1,
                CURLOPT_HTTPHEADER     => array(
                    'account_id:mr.125620728',
                    'api_key:d36edshc876f0p5bjge2jujr45'
                )
        );
        curl_setopt_array($ch,$options);
        $data = curl_exec($ch);
        $curl_errno = curl_errno($ch);
        curl_close($ch);
        return $data;
    }
but i am getting an error Not Found. i have tried many functions but invain. looks like having problem in passing my headers
In documentation its written something like this
curl –i -u account_id:api_key "https://xecdapi.xe.com/v1/account_info/"
but not getting information
Thanks
Regards
 
     
    