Reading Google search results using PHP?

孤街醉人 提交于 2020-01-06 07:08:41

问题


Is der any method to read the Google search result and display it own style . I want to read the contents of Google search results after users search for query will display only the .PDF files for the search queries is it possible to do with PHP ?


回答1:


Yes, by using Google's public search API.




回答2:


Like Bart mentioned you can and should use the API so as be on the up and up with Google.

But that being said if you want to really have a hack you can just make a curl request from php to do the search against google and parse the results. Or you could even do it in perl and just run the perl script from php.

But again this is not the preferred solution. I am just trying to provide an answer for your question. And yes it can be done.



来源:https://stackoverflow.com/questions/3155761/reading-google-search-results-using-php

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