Source Code:
(back to article)
<?php if ($_SERVER['HTTP_HOST'] == 'localhost' || $_SERVER['HTTP_HOST'] == '127.0.0.1') { echo 'You are accessing the website from localhost.'; } else { echo 'You are NOT accessing the website from localhost.'; } ?>
Result:
Report an issue