samedi 11 avril 2015

Writing "application/octet-stream" content type response as image/jpeg

Here is what I'm trying to do, which is failing in one case only -


1) Get the remote image via file_get_contents().


2) The response content type is coming up as "application/octet-stream".


3) Write the image into temp directory, Now the saved image is coming up as "application/octet-stream" content type rather than image/jpeg, while the original url is image.


4) Using imagecreatefromstring() returns false with binary data, setting headers is not making any difference.


any thoughts ?


Aucun commentaire:

Enregistrer un commentaire