I'm trying to add nested arguments to an IF statement.
What I am trying to accomplish is to only run the code following the code if:
1) a session hasn't been started...
2) the first three octets of the IP address don't match the octets from my home network or from the W3C (I have a link to the validator on my footer)
Currently, the opening of the IF looks like this...
I used your code, and it returned a 500 Server Error. I changed the NOT to a ! and the error went away, and I'm getting the results I want.
I take it you are checking to see what the value of $firstthreeip is what you are expecting and not something like "192.168.1."
What I'm doing is increasing a counter number by 1 if 1)a session doesn't exist and 2)the IP address is from something other than my internal network or the W3C (because I'm constantly validating my code everytime I make an HTML change).
If those two conditions don't exist, then the visitor "must" be new (at least since the last time they opened their browser).