I work for a university, and i'm implementing a PHP web app that needs to have different behavior when it is visited from one certain computer. The problem i am running into is that from the webserver, using $_SERVER['REMOTE_ADDR'] and gethostbyaddr(), i can only identify the router that a computer is going through, and not a specific computername.
Is there anyway i can set that one specific computer to identify itself to the server so the server knows when the webapp is being accessed from that machine? The computer is running firefox in kiosk mode, so addons or greasemonkey scripts are allowed...
Change Firefox's user agent header to something that uniquely identifies that machine, you can then extract this string in PHP from
$_SERVER['HTTP_USER_AGENT']
.See How to edit the User Agent string
You could set a cookie, or alternatively, you could modify the UserAgent header that your Firefox installation is using to something distinctive.
You can retrieve this User-Agent string from
$_SERVER['HTTP_USER_AGENT']
in php.Some thoughts:
What I wouldn't do is work according to the machine's MAC address (which Gibson tells us is possible) or similar; too fragile when hardware gets fixed, etc.