read meta tags of web site


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2.  
  3. // header set
  4. header("Content-Type: text/html; charset=utf-8");
  5.  
  6. function getInfo($URL){
  7. $getInfo= get_meta_tags($URL);
  8. return $getInfo;
  9. }
  10.  
  11. $URL = "http://www.joyent.com";
  12.  
  13. $_getInfo = getInfo($URL);
  14.  
  15. echo "$URL <p>";
  16. echo $_getInfo["author"]."<p>";
  17. echo $_getInfo["keywords"]."<p>";
  18. echo $_getInfo["description"]."<p>";
  19. echo $_getInfo["robots"]."<p>";
  20.  
  21. ?>

URL: http://snippets.symfony-project.org/snippet/409

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.