回复 5# boyhong
Global $sText
$Source = _INetGetSource('http://www.ip138.com/ips.asp?ip=' & InputBox("IP", "请输入IP地址"))
$aRe = StringRegExp($Source, '(?<=<li>)[^<]+', 3)
For $i = 0 To UBound($aRe) - 1
$sText &= $aRe[$i] & @CRLF
Next
MsgBox(0, '', $sText)
Func _INetGetSource($s_URL, $bString = True)
Local $sString = InetRead($s_URL, 1)
Local $nError = @error, $nExtended = @extended
If $bString Then $sString = BinaryToString($sString)
Return SetError($nError, $nExtended, $sString)
EndFunc ;==>_INetGetSource
|