Sections
     
     
WWWCoder.com Resource Directory

Ripping Web Content Using MSXML
9/22/2004 8:18:32 AM

The classic ASP way of ripping Web content from an external site.


'function accepts a method, normally "GET", and the URL to grab.
Function RipWebContent(Method, URL)
'On Error Resume Next
Dim objXML
Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP")
'The following properties of the method, user name and password is only for Basic Auth.
'objXML.Open Method, URL, False ,"UserName","Password"
objXML.setTimeouts 5000,5000,15000,15000
objXML.Open "GET", URL, False ,"",""
objXML.Send

If Err.Number = 0 Then
'and the url is valid
If objXML.Status = 200 then
'store all of the downloaded data in strOpen
RipWebContent = objXML.ResponseText
Else
RipWebContent = "Incorrect URL"
End if
Else
RipWebContent = Err.Description
End If
Set objXML = Nothing
End Function


Page Options:
format for printing  Format for Printer
email article  Email Page
add to your favorites   Add to Favorites
How would you rate the quality of this content?
Poor - - Excellent
Comments?
Overall Rating: No ratings available.
Comments Left:
     
     

 

     
     

 


 


Digg This
 


DotNetNuke Platinum Benefactor

     
     

Other family network sites: santry.com - katieandkarleigh.com

Powered by 

 

     
Copyright 20010 - Santry Technology Solutions, Box 172, Girard, PA 16417, (814) 774-0970
Privacy Statement | Terms Of Use