title: Can I also read the og:properties from other websites?
body: <p>In my website there is a functionality for the user to save bookmarks,</p>
  
  <p>once the user submits the URL i look for the <code>&lt;title&gt;</code> , <code>&lt;meta description&gt;</code> and <code>&lt;meta keywords&gt;</code> values to help the user to recover the data from the website,</p>
  
  <p>question is, how can i -if i can- with php read those vars from, for example <a href="http://domain.com/" rel="nofollow">http://domain.com/</a> ?</p>
  
  <p>-EDIT-</p>
  
  <p>trying like this but allways returns NULL</p>
  
  <pre><code>$url = '';
          if(isset($_GET['url'])){
              $url = $_GET['url'];
          }
          echo '&lt;form&gt;&lt;input type="text" name="url" id="url" placeholder="Introduce un dominio" value="'.$_GET['url'].'" /&gt;&lt;input type="submit" hidden /&gt;&lt;/form&gt;&lt;hr /&gt;';
          echo '&lt;h1 class="titulo"&gt;Examinando URL:  &lt;span&gt;'.$url.'&lt;/span&gt;&lt;/h1&gt;&lt;hr /&gt;';
          if($url &lt;&gt; ''){
              libxml_use_internal_errors(true); // Yeah if you are so worried about using @ with warnings
              $doc = new DomDocument();
              $doc-&gt;loadHTML(file_get_contents($url));
              $xpath = new DOMXPath($doc);
              $query = '//*/meta[starts-with(@property, \'og:\')]';
              $metas = $xpath-&gt;query($query);
              foreach ($metas as $meta) {
                  $property = $meta-&gt;getAttribute('property');
                  $content = $meta-&gt;getAttribute('content');
                  $rmetas[$property] = $content;
                  echo $rmetas;
              }
              var_dump($rmetas);
          }else{
              echo '&lt;p class="error"&gt;Introduce una URL&lt;/p&gt;';
          }
  </code></pre>
  
  <p>Test: <a href="http://toniweb.us/opengraph" rel="nofollow">http://toniweb.us/opengraph</a></p>