Is it safe to use this code to allow permission to access site?
if(!$_SERVER['REMOTE_ADDR'] == "xxx.xxx.xxx.xxx"){
?
Is it possible to get user Mac address ?
Is it safe to use this code to allow permission to access site?
if(!$_SERVER['REMOTE_ADDR'] == "xxx.xxx.xxx.xxx"){
?
Is it possible to get user Mac address ?
Well whats safe? If you do this, you may be able to access your site. But then again, if you do not have a static ip, it wont work for long.
A better solution with php would be to just write a simple login, with non-hardcoded user and pass.
If you run an apache, you could use .htaccess for this too, just set a password and anybody wanting to access your site (if thats what you specify), is required to first type the user/pass combination.