thanx. basically what I want to do is to write a counter, that checks whether the visitor is a search engine or myself, if not, then the counter should be increased, otherwise stay the same:
if ($ip==$myip)
{
echo "admin detected";
}
else if ($HTTP_USER_AGENT==$googleuseragent)
{
echo "google detected";
}
else if ($ip!==$myip)
{
connect to mysql, increase counter etc.
}
The thing that confused me is that for the search engine both statements are true - $HTTP_USER_AGENT==$googleuseragent AND $ip!==$myip. But since you say that "elseif" checks the second condition only if the first one proves false, then it's ok, isn't it? when php detects that $HTTP_USER_AGENT==$googleuseragent, it won't even move to the next condition (or to the next conditionS, if there are several ones), but will stop right there, right?
I know, in practice I could combine several conditions, but I just want to know whether such a script is ok.