Hello Dallas, 

(DK == "Dallas Kropka") [EMAIL PROTECTED] writes:

DK> Posted earlier but got no response.... so here it is again...

I gave you a quick explanation of one way to do it earlier, but I know
of no tutorials off the top of my head.

Here is a lengthy example if you _have_ to see code:

<?php

$URI = 
'http://www.altavista.com/cgi-bin/query?q=foo+and+bar+and+baz&kl=XX&pg=q&Translate=on';

/* the above would obviously be $HTTP_REFERER */
/* I typed in 'foo and bar and baz'           */

$parts = explode('?',$URI);
$query = explode('&',$parts[1]);
$terms = explode('=',$query[0]);
$keywords = explode('+',$terms[1]);

print 'They used: <br>';
while(list(,$keyword) = each($keywords))
{
    print "$keyword<br>";
    /*
      still going to print
      'and' and 'or' and 'not' and ..
    */
}

?>

But there has to be an easier solution out there that's already been
ridden to death. The above is going to get nasty rather quickly I'd
imagine, and every search engine, more than likely, is going to have a
completely different query string. There's no way I'm going to look.
:)

I wouldn't reinvent the wheel; go do some searching, poke through
someone's "stats" code. I'm sure this has been done before in PHP, and
I _know_ it's been done in Perl -- which is fairly easy to translate.

-Brian
--
A)bort, R)etry, I)gnore, V)alium?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to