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