In other words, how can I tell if the person using my web application is on the server it resides on? If I remember correctly, PHPMyAdmin does something like this for securi
As a complement, as a function...
function isLocalhost($whitelist = ['127.0.0.1', '::1']) { return in_array($_SERVER['REMOTE_ADDR'], $whitelist); }