Vincent, thanks for your reply. I'm now confused as ever. When I had my code like this:
$z = $REMOTE_ADDR;
$match = "206.662";
if (!strncmp($z, $match, strlen($match)))
{
$url= "http://www.re_direct_visitor.com/";
header("location: $url");
}
....then ALL visitors with "206.662" in their remote address were redirected.
However, with the new code with the gethostbyaddr:
$z = gethostbyaddr( $REMOTE_ADDR );
$match = "attbi";
if (strpos($z, $match, strlen($match)))
{
mail("david@awesome-prices.com","String Hit"," . $REMOTE_ADDR . ","<david@awesome-prices.com>");
}
... then ALL visitors with "attbi" are redirected.... BUT, the CONFUSING thing is that I REMOVED the "!" before the strpos. Can you help in "laymans" terms? (I've read and reread the php manual site, just gives me a headache :-)