English 中文(简体)
传真PHP - 如何吸引用户(顾问)信息
原标题:HTMLPHP - How to elicit user (visitor) s info

在用户访问网站时如何获取信息?

  • IP Address
  • Mac Address
  • User Profile Name
  • OS Name
  • OS version
  • OS Registered to (Name/Company)
  • Computer Name
  • Browser Name
  • Browser Version
  • ISP Name/Internet Connection Provider Name
  • Connection Type
  • Location - City/Country (based on IP)
最佳回答

回答你提出的大多数问题,要么是不可能的,要么是不可能的,要么是用javascript,要么使用ja子从服务器的边接过,要么把用户扼杀(这总是可以证明)。

  • IP Address: You have to use a serverside language. If you need it dynamically, you can get it from an AJAX call. In PHP, it s $_SERVER[ REMOTE_ADDR ]
  • Mac Address: Not available, except very very rarely if the user is using IE and has poor security settings.
  • OS, OS Version: You can get it by parsing the User Agent String. A script like this can do it pretty robustly: http://www.quirksmode.org/js/detect.html
  • OS registered to: Impossible.
  • Computer Name: Impossible.
  • Browser Name, Browser Version: You can get it by parsing the User Agent String. A script like this can do it pretty robustly: http://www.quirksmode.org/js/detect.html
  • ISP: You ll need to use some kind of 3rd party database for querying who owns an IP. Or, you can call a command line whois . In PHP, that would look like shell_exec("whois $_SERVER[ REMOTE_ADDR ]"); that would return the whois record for that IP address, which you can parse to get an ISP.
  • Location: You ll need to use some kind of 3rd party tool to associate an IP address with a general region. (something like this: http://ipinfodb.com/ip_location_api.php)
问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签