Solved

Display google results in my website

Posted on 2008-06-17
6
590 Views
Last Modified: 2013-12-08
I want to dislay the google results in my website.  
I am running PHP and want to dynamically display the google search engine results in my webpage.
The google results I assume will be displayed in a frame on my webpage.

For example, I have the query http://news.google.com/news?hl=en&ned=us&q=aflcio and I want the resulting data displayed on my website.
0
Comment
Question by:pmsguy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 20

Assisted Solution

by:virmaior
virmaior earned 150 total points
ID: 21806041
meaning you want to display that page in a iframe or you want to curl the data into your own web page?
0
 

Author Comment

by:pmsguy
ID: 21806711
Whatever is the most optimal solution.
0
 
LVL 20

Expert Comment

by:virmaior
ID: 21806748
in this case, the choice isn't about optimization.  They are substantially different ways of doing this with significant trade-offs.

For an IFRAME, it's going to be obvious that you are just putting google in an IFRAME.  and you won't be able to control anything about it.

For curl, google probably won't appreciate it.

a third option is that google has a search API that you can use, but I believe they charge to use it for any commercial purpose.

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Assisted Solution

by:Matthew Kelly
Matthew Kelly earned 150 total points
ID: 21807806
I have used this script before:

http://www.digitalpoint.com/tools/search/

It is well documented, simple, and lets you put google results in your own website, formatted the way you want. Try it out!
0
 
LVL 18

Expert Comment

by:Matthew Kelly
ID: 21807809
0
 
LVL 31

Accepted Solution

by:
gwkg earned 200 total points
ID: 21809279
Simply grab an RSS feed of your search

http://news.google.com/news?q=aflcio&output=rss

Google RSS Feed info: http://www.google.com/support/news/bin/answer.py?hl=en&answer=59255

Search Google for RSS PHP if you need more info on how to display the XML data in PHP.  There are a lot of libraries out there.

Here is one way to do it. http://www.ibm.com/developerworks/xml/library/x-phprss/index.html
And another: http://rssphp.net/
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question