ip : http://www.whatismyip.com
useragent: http://whatsmyuseragent.com
也可以在程序中请求:
NSString *strReturn = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://automation.whatismyip.com/n09230945.asp"] encoding:NSUTF8StringEncoding error:nil];
strReturn 就是网站返回的你设备当前的ip;
本文介绍如何通过在线工具和服务获取设备的IP地址及UserAgent信息。提供了http://whatismyip.com用于查看IP地址,http://whatsmyuseragent.com用于获取UserAgent,并给出了一段示例代码展示如何通过发送HTTP请求来读取当前设备的IP。

被折叠的 条评论
为什么被折叠?



