Hi
I was thinking that it would be useful if there was a way of getting the search engine query from the referring url and extracting a part of it to use to deliver relevant content.
eg
user 1 is searching for a bmw car in google
she enters 'bmw cars' into google and presses search.
user 1 finds a link saying the 'best bmw cars' and goes to bestcars.com. has lots of information on cars. In order to find bmw car info user1 has do a secondary search for their desired bmw.
now..
the log files of bestcars.com would show a refering string of 'bmw cars' that came from google.
My idea is to use the same information but put straight into my query before the intitail page is delivered.
So that in the case of the scenario above, the user would not have to do any secondary searching, I would calibrate the page so that they were dlelivered optimised content, that fitted their google query.
$query = $a_function_to_grab_search_engine_query_strings;
if($query){
do stuff
eg query db with a predefined list of switch statements that compared an aspect of the string with a defined list
}
else{
do something else
}
Hope this is clear
Im thinking that I might be able to use $HTTP_REFERERand parse_url
but im not sure if this is the best way to do it.
Any ideas?
Tia
Rob