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