How to get image from bytes array in php ? i have string of byte array and i want to generate a image.
I have tries this code below.
$arrayData = array(
'status' => 404,
'message' => 'Not Found'
);
$json = file_get_contents('php://input');
$obj = json_decode($json,true);
$img = isset($obj['image']) ? $obj['image'] : '';
print_r($img); die;
$filename = $finalimage . '.' . 'jpg';
$filepath = base_url().'uploads/apifiles'.$filename;
file_put_contents($filepath, $finalimage);