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

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

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

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
scavdog
Asked:
scavdog
1 Solution
 
aolXFTCommented:
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

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now