Copy link to clipboard
Copied
I want to use CGI variable to get client information like IP Address, Machine Name and browser name and version,
I just get REMOTE_ADDR for IP address, but I can not get machine name using REMOTE_HOST, nor browser information,
I would like to know do I need any set at server level to get this client informaiton using CGI variable?
If not, are there any server variable available to get client informaiton?
Your help and information is great appreciated,
Regards,
Iccsi,
<cfdump var="#CGI#">
will show you what you can get.
The REMOTE_HOST being empty is possible; it happens on some DNS configurations I recall.
Adobe say this: "Because the available variables depend on the server, browser, and the types of interactions between the two, not all variables are normally available, and are represented by empty strings in the debug output." in addition they say this about CGI.REMOTE_HOST: "If the server does not have this information, it sets REMOTE_ADDR and does not set
...Copy link to clipboard
Copied
<cfdump var="#CGI#">
will show you what you can get.
The REMOTE_HOST being empty is possible; it happens on some DNS configurations I recall.
Adobe say this: "Because the available variables depend on the server, browser, and the types of interactions between the two, not all variables are normally available, and are represented by empty strings in the debug output." in addition they say this about CGI.REMOTE_HOST: "If the server does not have this information, it sets REMOTE_ADDR and does not set REMOTE_HOST."
What you get back in the CGI scope depends on many things in the client, and the client may even withhold some information depending on local settings or security setup etc.
Copy link to clipboard
Copied
The only browser information you can get from the server-side is the user agent string, and it can be easily spoofed. I'm sure you can find a library out there which can break down the strings and give you some basic information, but it may be a more reliable process to instead have the client determine via JavaScript what browser and version it is.
Also, you should be mindful that things like an IP addres are not a definitive way of determining individual users. People can access your site through a proxy server, which presents multiple users access to the internet behind a single IP address.
Copy link to clipboard
Copied
Thanks a million for the information and help,
Regards,
Iccsi,