Solved

Display google results in my website

Posted on 2008-06-17
6
553 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 150 total points
Comment Utility
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
Comment Utility
Whatever is the most optimal solution.
0
 
LVL 20

Expert Comment

by:virmaior
Comment Utility
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 18

Assisted Solution

by:Matthew Kelly
Matthew Kelly earned 150 total points
Comment Utility
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
Comment Utility
0
 
LVL 31

Accepted Solution

by:
gwkg earned 200 total points
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Wordpress Query 1 30
Remove right text widget from smaller screens 15 42
Drop down button NAMES disappear 1 37
Angular JS form 8 23
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
This article discusses how to create an extensible mechanism for linked drop downs.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to count occurrences of each item in an array.

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now