Good day,
I'm loading my images from the third party server using curl. Some of the image is loading but some are broken then when I refresh it the broken image will load and some of the image that loaded before the refresh is now broken. I'm loading 50 or more items at a time.
header('Content-Type: image/png');
$formData=$_REQUEST;
$token=$formData['token'];
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_BINARYTRANSFER => 1,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'url'.$token,
CURLOPT_HTTPHEADER=>array(
'Content-type: application/json',"Some key here"
)
));
$resp = curl_exec($curl);
curl_close($curl);
echo $resp;
Then here how I retrieve it
<img src='myURLHere?token=20170704-2a5793e6-97680a39.png'>
Am I missing something or there is just some configuration on apache server that I need to set?