i am using image intervention to upload images in Laravel 8 and it works well in the local host but in the host, I get this error message
file_get_contents(): data:// wrapper is disabled in the server configuration by allow_url_fopen=0
and I have no ability to change anything in php.int, so is there any way to use something instead of using file_get_contents()
here is my code in controller to upload image.
Image::make(file_get_contents($back))->save($path_b);
knowing that after searching I could not know how to use the method below
function fOpenRequest($url) {
$file = fopen($url, 'r');
$data = stream_get_contents($file);
fclose($file);
return $data;
}
$fopen = fOpenRequest('https://www.example.com');