I have a string like https://filemanager.elo.io/shop/fc1430db9a.ogg
in my database that i pass to my API. In the api, i try to convert the string to file but get the error
Call to a member function guessExtension() on resource
API.php
public function testAPI(Request $request)
{
//receive media string or url from database
$media_url = $request->get('media_url');
$media_file = fopen($media_url,'r');
$media_file->guessExtension();
}
What could i be doing wrong ? Could it be my url is not converted to file ?
PS: New to PHP & Laravel