How do I make a website that can search google? [closed]
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this questionHow do I make a website search google, and then return the resulting URLs to the page without taking the user to google?
Have a look on google custom search api
http://code.google.com/apis/customsearch/v1/overview.html
What you would normally do in this situation is to employ an API provided by the vendor of the service you wish to consume or present to your customers; but AFAIK Google provides no API for searches, considering the fact that, by and large, searches is what Google Does™.
You could of course submit regular HTTP searches to http://google.com and scrape the resulting HTML for the results; but that method is extremely liable to breakage if they change their markup; and you risk getting reamed by Google's legal team.
Reamed hard.
Edit: Re: API I stand corrected; it appears you actually have a choice: Pay out your nose, or risk breakage and reaming.
精彩评论