Santry Technology Solutions, Content Management, DotNetNuke, SharePoint Consulting
Register | Login
Thursday, November 20, 2008

Sections
  
About Us
  
Partners
Downloads
  
 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:
  

 Latest Articles
  

 Latest News
  

 

Spotlight
Syndication

 


 


Digg This
 


DotNetNuke Platinum Benefactor

  
 

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