I authenticate users by their hostname for some internal sites. I do this by:
if( gethostbyaddr($_SERVER['REMOTE_ADDR']) == .... ) { ...
But im not sure if it is safe to login users this way. Is there a chance to improve the security of this auto-login method? Or is this method already safe enough?
I like this method due to its simplicity. They work very well.
Thanks
Update:
Environment: Local intranet, with around 20 Clients. Local managed DNS.
My Question is different to Is it safe to trust $_SERVER['REMOTE_ADDR']? because i use the hostname and not the IP-Address to identify the user!