本帖最后由 chishingchan 于 2011-9-15 01:17 编辑
回复 2# xuzhenjun130 $url = "http://www.ppstream.com/download.html"
$search_1 = "<span class=""version""><em>"
$search_2 = "</em>"
$search_3 = "</span>"
$binary = InetRead($url)
$string = BinaryToString($binary)
$result_1 = StringInStr($string,$search_1,0,1)
$result_2 = StringInStr($string,$search_2,0,1)
$result_3 = StringInStr($string,$search_3,0,1)
$VersionStart = $result_1 + StringLen($search_1)
$VersionNum = $result_2 - $VersionStart
$version = StringMid($string,$VersionStart,$VersionNum)
$DateStart = $result_2 + StringLen($search_2)
$DateNum = $result_3 - $DateStart
$date = StringMid($string,$DateStart,$DateNum)
MsgBox("","网络文件版本检测","版本:" & $version & @CRLF & "日期:" & $date)
|