|
|
| |
1. Undefined offset: 1 on line 79 |
|
Reply |
|
|
 Marco Rossi | 2012-10-08 17:43:02 |
Hi!
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!
Byez! |
| |
2. Re: Undefined offset: 1 on line 79 |
|
Reply |
|
|
 Seth Carter | 2012-10-11 16:35:32 - In reply to message 1 from Marco Rossi |
Hi,
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:
http://stackoverflow.com/questions/527638/getting-the-client ...
Seth |
|