iphone获取本机IP
来源:互联网 发布:可可网络验证 编辑:程序博客网 时间:2024/04/29 12:18
-(NSString *)getAddress {
char iphone_ip[255];
strcpy(iphone_ip,"127.0.0.1"); // if everything fails
NSHost* myhost =[NSHost currentHost];
if (myhost)
{
NSString *ad = [myhost address];
if (ad)
strcpy(iphone_ip,[ad cStringUsingEncoding:NSASCIIStringEncoding]);
}
return [NSString stringWithFormat:@"%s",iphone_ip];
}
来源:http://blog.sina.com.cn/s/blog_5fae23350100dvx9.html
- iphone获取本机IP
- 获取iPhone本机IP地址新方法
- 获取本机IP
- 获取本机IP
- 获取本机IP
- 获取本机IP
- 获取本机ip
- 获取本机IP
- 获取本机ip
- 获取本机ip
- 获取本机IP
- 获取本机IP
- 获取本机IP
- 获取本机ip
- 获取本机ip
- 获取本机Ip
- 获取本机 ip
- 获取本机ip
- android为图片生成缩略图
- Cookie的有效期
- Oracle常用SQL语句汇总
- CxGrid使用小结(续)
- 拓扑排序
- iphone获取本机IP
- DevExpress部分使用技巧
- cxGrid技巧汇总
- 有关注册javascript
- InstantiationException
- cxGrid在内置右键菜单的后面增加菜单项并实现诸多功能
- FastReport问题整理(技巧)
- 暑假结束
- 水水水 zoj 2886 Look and Say