The adsl ip address is dynamic. How can I obtain its IP address?
The terminal can only submit an IP address to the server at intervals to obtain its current IP address.
Asp.net can use request. userhostaddress to obtain the Client IP address.
We created an Asp.net page to get the IP address.
: Http://files.cnblogs.com/zjfree/getIp.rar
Embed the above page into your server.
Usage:
If you directly access the getip. aspx on the server, the current client IP address and the list of all registered IP addresses are displayed.
When using getip. aspx? Id = home during access, note that home is your unique identifier, and the server will automatically record the Client IP address and identifier to the application.
When you access a page with the ID parameter, the page is automatically refreshed every minute, so that each time you submit your latest IP address to the server.
Note that because the ID is specified by the user, you need to control it and do not repeat it with other IDs.
Test address: http://www.phook.cn/test/getip.aspx