php get_meta_tags not fetching property=“og:type” tags

只愿长相守 提交于 2019-12-10 17:52:51

问题


so php's get_meta_tags would fetch the meta tags that has a name field to it but sometimes there are meta tags that has no fields but uses property="" as identifier instead and this function is not fetching it....

is there any better way to get meta tags including those with property="" identifiers in php?


回答1:


Parse the XML or HTML yourself with DOM's loadHTML and run an xpath on it.



来源:https://stackoverflow.com/questions/4894068/php-get-meta-tags-not-fetching-property-ogtype-tags

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!