import
inet.whttp;
|
02
|
03
|
Array
= function(...) {
|
04
|
return
{...}
|
05
|
}
|
06
|
var
ip = eval (
|
07
|
string.match
(
|
08
|
inet.whttp().get("http://fw.qq.com/ipaddress")
|
09
|
,
"new (.+)"
|
10
|
)
|
11
|
);
|
12
|
13
|
io.open()
|
14
|
io.print(
ip[1],ip[2],ip[3],ip[4] )
|
本文演示如何通过HTTP请求获取远程服务器的IP地址,并使用正则表达式从中提取信息,然后通过IO操作将提取的IP地址各部分打印出来。

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



