PHP
Allowing access to a PHP application through the GoodAccess, please refer to the following documentation.
Function
function isAllowed($ip){
$whitelist = array(‘111.111.111.111’, ‘112.112.112.112’); // If the ip is matched, return true
if(in_array($ip, $whitelist)) {
return true;
} return false;
}
if (! isAllowed($_SERVER[‘REMOTE_ADDR’])) {
exit;
}
Last modified 1yr ago