Xml
<%
' Function 1 call xsmxl2.xmlhttp for remote crawl
function gethttppage (URL)
On Error Resume Next
Dim http
Set Http=server.createobject ("Msxml2.xmlhttp") ' uses XMLHTTP method to get the contents of a picture
Http.open "Get", Url,false
Http.send ()
If Http.readystate<>4 Then
Exit function
End If
Gethttppage=http.responsebody
Set http=nothing
If Err.number<>0 then err. Clear
End Function
' function 2 to save data
function img (from,tofile)
Dim Geturl,objstream,imgs
Geturl=trim (from)
Imgs=gethttppage (Geturl)
Set objstream = Server.CreateObject ("ADODB. Stream ")
objStream.Type =1
objStream.Open
Objstream.write IMGs
Objstream. SaveToFile Server.MapPath (ToFile), 2
Objstream. Close ()
Set objstream=nothing
End Function
%>
<%=img ("http://stock.jrj.com.cn/htmdata/gifindex/Sh_000001.png "," Http://www.webjx.com/htmldata/2005-08-22/Sh1.png " )%>
<%=img ("http://stock.jrj.com.cn/htmdata/gifindex/sz_399001.png "," Http://www.webjx.com/htmldata/2005-08-22/Sh2.png " )%>
<%=img ("http://business.sohu.com/new_world_index.html "," gjgshq.html ")%>
<iframe name= "A" scrolling= "Auto" frameborder= "0" src= "gjgshq.html" width= "160" height= "140" ></iframe>