0

I am working on a php website. What I want to do is to retireve description or meta information of websites. What I hope to do is to obtain the information from dmoz.org, is there a way of doing such a thing ?

If not, then what are other alternatives ? cURL ?

Many thanks,

EDIT:

Apparently my question wasn't clear. dmoz.org is open directory that gives you information about websites. The information given is different than the meta tags from the website itself. So what i want to do is getting such information..

Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240
Louis
  • 1,265
  • 1
  • 15
  • 22

1 Answers1

1

PHP has a built-in function for extracting the meta information:

$tags = get_meta_tags('http://dmoz.org');
print_r($tags);
davidethell
  • 11,708
  • 6
  • 43
  • 63
  • Sorry, apparently my question wasn't clear :( dmoz.org is open directory that gives you information about websites. The information given is different than the meta tags from the website. So what i want to do is getting such information ... – Louis Sep 28 '11 at 02:08
  • So are you wanting to pull information from the results of a query against a domain name, like this:http://www.dmoz.org/search?q=stackoverflow.com – davidethell Sep 28 '11 at 09:50
  • Many thanks :)... Exactly what i need. Would you kindly lead me or guide how can read what's in the page ? for example parsing the tags ? – Louis Sep 30 '11 at 04:06
  • This is probably the best PHP html parser: http://simplehtmldom.sourceforge.net/. I'd start there. It breaks the entire document down into elements you that you can search. – davidethell Sep 30 '11 at 10:38