tags:

views:

244

answers:

2

Hi Friends,

I want to get all the meta information like description, title, keyword etc of any web page using php.

I am using *get_meta_tags* php function but its displaying warning. I have paste the error below.

Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: No such host is known. in filename......

And how could i get all images on the web page.?

Thanks in advance.

+1  A: 

I think your putting an address as link identifier (http://path/to/your/file.php)? And not a file (file.php)?

Ben Fransen
Yes, i am giving http://google.com/
Avinash
A: 

"getaddrinfo failed" suggests that your webserver's dns client isn't configured properly. Thererfore php cannot resolve "google.com" to an actual ip address.

VolkerK
Yes my code working for local url very fine. But not for the actual url.So want to do in this situation.??
Avinash
This depends on the os (maybe also the distribution) and the dns client you're using.
VolkerK
i am also not able to ping google from command prompt.Its displaying Destination Host unreachable... :-(
Avinash
Most likely the same problem. Which operating system does your webserver use and how is this box connected to the internet?
VolkerK