Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Display google results in my website

Posted on 2008-06-17
6
Medium Priority
?
597 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
6 Comments
 
LVL 20

Assisted Solution

by:virmaior
virmaior earned 600 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 600 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 800 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

926 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