I have try to call below command in using php but its give blank response so please anyone help to call below command in php.
curl -v -u [email]:[token] -X GET https://api.coolrunner.dk/v1/me
You can use this curl class
There is a sample :
include 'curl.class.php';
$curl = new Curl();
try {
$respones = $curl->get('http://jsonplaceholder.typicode.com/posts/1');
var_dump($respones);
$result = json_decode($respones);
echo "<br />Title : ".$result->title;
}catch (Exception $e){
echo $e->getMessage();
echo $curl->getError();
}
I think this is a sample for your request :
include 'curl.class.php';
$curl = new Curl();
$email = '[email protected]';
$token = 'kaiDklasdfSDFv6adsfvjhsadr';
try {
$curl->setBasicAuth($email,$token);
$respones = $curl->get('https://api.coolrunner.dk/v1/me');
var_dump($respones);
}catch (Exception $e){
echo $e->getMessage();
echo $curl->getError();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With