Readie - 5:11 pm on Jun 11, 2013 (gmt 0)
I know this comment doesn't really pertain to the issue at hand, but...
$info['ip'] != null
Just jumping in here to say you should ideally be using the !== (not identical to) operator here, as all the following are considered equal to null by PHP:
Get in the habit of doing this and it can save you a lot of headaches further down the line :)