Jump to content

Identifying Certain Computers


hishighness

Recommended Posts

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! :D

Link to comment
https://forums.phpfreaks.com/topic/155610-identifying-certain-computers/
Share on other sites

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)

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.