Solved

How can I retrieve information from a search engine in order to display relative info on a page

Posted on 2003-12-05
3
218 Views
Last Modified: 2006-11-17
I am trying to create a dynamic text block that would change depending on what search values a user entered to surf to our site.  How can I retrieve that info from the search engine?
0
Comment
Question by:scavdog
[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
3 Comments
 
LVL 6

Accepted Solution

by:
aolXFT earned 125 total points
ID: 9884492
you need to be _WAY_ more specific. That would be pretty advanced stuff, and no matter what you do, it may work, it may not.

To get the terms entered into a search engine will vary depending on the search enginge. You may be able to get variables passed by the get method, parsing $_SERVER['HTTP_REFERER']. You won't be able to get variables passed by the Post method however.

for Google this _may_ work

$match = array();
preg_match("#q=(.*?)&#", $_SERVER['HTTP_REFERER'], $match);
$search = $match[0];
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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.

615 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