I've tried a few different things, but everything I can find isnt working. I have a photo URL, and am trying to access it with the appropriate authentication
$service_url = 'photo URL';
$curl = curl_init($service_url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Bearer code'));
curl_setopt($curl, CURLOPT_USERPWD, "Username:Password");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_handle, CURLOPT_CUSTOMREQUEST, 'GET'); // LINE 12
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
$curl_response = curl_exec($curl);
$response = json_decode($curl_response);
curl_close($curl);
var_dump($response);
Obviously I'm trying to do a GET, but im not sure its working correctly. I'm also not sure that the
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Bearer code'));
line is working correctly.
Any ideas?
P.S. - The link is a https://
Thanks!
$curl_responseafter this is called?