Here's something that is probably quite rare for most people, but I came across it today so thought I'd share the info.
Addresses ending in 127 (for example my virgin media address of 86.23.49.127) will fail spamhaus checking.
If an IP address is found on spamhaus then the return code will almost always be 127.0.0.x or 127.0.x.x
However, if not found, it returns the reverse of the queried IP, i.e. in the example above it would return 127.49.23.86
As the PHP script just checks the first value in the array, $result[0], to see if it is 127, then any address ending in 127 will fail, or at least seem to fail.
To get around this I altered the script on my server to check for $result[0] . $result[1] and matched it on 1270 instead of just 127, and it works fine.
I hope that's straight forward enough and hope it helps you if you come across the same situation!