Ignoring PHP, relying on the IP address that appears to come from the request is a pretty weak form of security. You should consider using HTTPS with separate client certificates passed to each trusted source.
SSL may seem complicated at first, but what you need here is not at all difficult, and you will gain a valuable skill by learning it.
source
share