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 ?
I think this is also a good place to start: http://code.google.com/intl/en/apis/customsearch/docs/api.html
pritaeas
2010-07-01 07:27:25
A:
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.
spinon
2010-07-01 07:28:47
Note that Google might ban the IP addresses from hosts that do a lot of those "hack-searches". Also, last I checked, only clients that "look" like a browser can get search results back, so you'd have to pretend to be a browser in the request-header.
Bart Kiers
2010-07-01 07:31:13
Totally agree Bart and I know from experience that they will catch on and limit you to so many per day. There are some ways around it that I found. (Had a client that had very similar needs so I did the work. They paid good.) But it's really not worth it. It's better to just have good practices from the beginning so as to limit headaches later.
spinon
2010-07-01 07:33:19
ok but how can i display the result in PHP.. how can i retrieve the results. that is my major problem ?
2010-07-01 09:27:45
I am going to assume you want to use the search API vs the method I described in my answer since this is the preferred method you should use. With that being the case you can check out their code playground which has working code samples: http://code.google.com/apis/ajax/playground/?exp=search#the_hello_world_of_blog_searchAlso you can look here: http://code.google.com/apis/ajaxsearch/documentation/For specific code examples of how to do this in PHP.
spinon
2010-07-01 09:35:04