title: Fetch og:image by file_get_contents and preg_match
body: <p>I'm Using file_get_contents to get og:image from any url.</p>
  
  <pre><code>$fooURL = file_get_contents($URLVF['url']);
  </code></pre>
  
  <p><br>
  And then I filter property=og:image to get the image from the page and this code below work with most of the websites</p>
  
  <pre><code>preg_match("/content='(.*?)' property='og:image'/", $fooURL, $fooImage);
  </code></pre>
  
  <p><br>
  But sites like www.howcast.com have deffrent code of og:image like below</p>
  
  <pre><code>&lt;meta content='http://attachments-mothership-production.s3.amazonaws.com/images/main-avatar.jpeg' property='og:image'&gt;
  </code></pre>
  
  <p><br>So to get the image link for above code I need the preg_match to be like this</p>
  
  <pre><code>preg_match('/property="og:image" content="(.*?)"/', $fooURL, $fooImage);
  </code></pre>
  
  <p><br>But of course if I used the code above now the only site will work is howcast and every site else will return nothing</p>
  
  <p>Any idea how can I make the code work with any kind of method the meta code is written or any alternative way to get the image link smoothly</p>