Avoid SQL injection in get_ip()

HTTP_X_FORWARDED_FOR is a client data you should absolutely not trust.
It's used in some query sql and can lead to SQL injection.
Merge pull request #4 from vthibault/patch-2

Avoid SQL injection in get_ip()