hishighness Posted April 25, 2009 Share Posted April 25, 2009 Hey all, I'm trying to block a few computers from my workplace (or more accurately the people who use them) from my website. My first thought was to use IP addresses but unfortunately I guess because of the way our network is set up some computers have the same IP address so if I blocked by IP I'd end up blocking good people as well as the bad apples. So I was wondering if there is some sort of unique computer identifier that can be captured using php I could use to ensure I'm only blocking the people I want to. I can log in to their computers (using my own ID of course) and get any info needed while they're not there so getting the info wouldn't be a problem. I don't really want to create a login system because I want it to look like the site just isn't working for them. (which wouldn't be a stretch because my web host sucks) Thanks for reading! Quote Link to comment https://forums.phpfreaks.com/topic/155610-identifying-certain-computers/ Share on other sites More sharing options...
Daniel0 Posted April 25, 2009 Share Posted April 25, 2009 If you've got admin rights on that computer, you could edit their hosts file so your websites domain name won't resolve for them. Quote Link to comment https://forums.phpfreaks.com/topic/155610-identifying-certain-computers/#findComment-819000 Share on other sites More sharing options...
hishighness Posted April 25, 2009 Author Share Posted April 25, 2009 No, unfortunately I don't have admin access. Quote Link to comment https://forums.phpfreaks.com/topic/155610-identifying-certain-computers/#findComment-819034 Share on other sites More sharing options...
DjMikeS Posted April 25, 2009 Share Posted April 25, 2009 Hey all, I'm trying to block a few computers from my workplace (or more accurately the people who use them) from my website. My first thought was to use IP addresses but unfortunately I guess because of the way our network is set up some computers have the same IP address so if I blocked by IP I'd end up blocking good people as well as the bad apples. That's also known as DHCP Maybe someting like: <?php $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); echo $hostname; ?> This works great when the webserver is in the same network as the clients... If the webserver is not in the same network (seperated by router) you would lock out the router thus locking out the entire network behind that router...(NAT, http://en.wikipedia.org/wiki/Network_address_translation) Quote Link to comment https://forums.phpfreaks.com/topic/155610-identifying-certain-computers/#findComment-819181 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.