I've tried this script, but sometimes i get this error:
Undefined offset: 1 on line 79
the line is:
$Blocks = $IPComponents[$iBlocks];
Where is the problem?
Thank you very much!
|2012-10-11 16:35:32 - In reply to message 1 from Marco Rossi|
If you're getting this error then it means that the $IPComponents variable probably isn't an array (failed to explode the IP), check the value of $_SERVER['REMOTE_ADDR'] if you get this error - It SHOULD be an IP address but depending on your ISP you may need to substitude this setting with another value, like HTTP_X_FORWARDED_FOR or something else depending on your setup.
Check out this thread on stack overflow for some tips on whats best to use for your situation: