I am trying to get a image data from url using file_get_contents()
and then crop the image and pass the the cropped image data as string to another function.
My codes are,
$imageData = file_get_contents($imageurl);
$imgcrop = imagecrop($x,$y,$width,$height);
gettype($imgcrop ) // a resource type, I want them to be string/bytes
uploadThisData(imgcrop) ;
So my problem is $imgcrop
data is resource type, how can I get string/bytes value from this? Thank you.