When we are using a web service, we need to pass one argument as base64 binary,but I have to convert an image into byte array. I used base64_encode,but it didn't worked.
That web service is built on .NET,there that argument is treated as byte array.. So I would like to know how we could create such a thing in PHP which is equivalent to byte array in .NET
Presently I'm using this,
$byte_array = file_get_contents('C:\xampp\htdocs\my_site\RGB.jpg');
$image = base64_encode($byte_array);
But unfortunately,this is not working... thanks in advance..