使用php获取元信息,标题和任何网页的所有图像 [英] Get meta information, title and all images of any webpage using php

查看:111
本文介绍了使用php获取元信息,标题和任何网页的所有图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用php获取任何网页的所有元信息,例如描述,标题,关键字等.

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

我正在使用get_meta_tags php函数,但显示警告.我在下面粘贴了错误.

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

警告:file_get_contents()[function.file-get-contents]:php_network_getaddresses:getaddrinfo失败:此类主机未知.在文件名中...

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?

谢谢.

推荐答案

"getaddrinfo失败"表明您的Web服务器的dns客户端配置不正确.因此php无法将"google.com"解析为实际的IP地址.

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

这篇关于使用php获取元信息,标题和任何网页的所有图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆