I have a function that would fetch a remote image via CURL, returning a string variable of the contents of the remote image.
I do not wish to write the content into the file, but wish to get the size of the image.
since getimagesize() only supports a file, is there a function similar to getimagesize() but can support strings of image content?
to clarify:
$image_content = file_get_contents('http://www.example.com/example.jpg');
how to get the image size of $image_content instead of running getimagesize('http://www.example.com/example.jpg');?
Thanks in advance
PHP functions imagecreatefromstring, imagesx, and imagesy.
Something like this;