Is it possible to check if the website (php) is running locally or on a hosted server? I want to enable some logs if the website is running locally and I don\'t want these to ap
$whitelist = array( '127.0.0.1', '::1' ); if(!in_array($_SERVER['REMOTE_ADDR'], $whitelist)){ // not valid }