I need to send an image to a web service. The web service should receive the image as bytes (maybe bytearray) - not as a string ... How to convert images to "byte" or bytearray?
I tried this (without success):
$image1 = file_get_contents("LINK TO IMAGE"); $image1BinaryData = "".base64_encode($image1)."";
Any help would be appreciated ...
source share