Codefixer - ASP tutorials, resources and software
ASP.NET 3.5 Hosting – Click Here!
Home   Articles   Resources   ASP directory   ASP Tutorials   Code Snippets   ASP Applications   Forum
Saturday 10 May
MembersPro PayPal - ASP Membership software

DiscountASP.NET – ASP.NET 3.5/2.0 Hosting


ASP Partner ASP Partner ASP Partner more partners...

Screenscraping using ASP and Microsoft.XMLHTTP Object

Here's a commonly used function that shows you how to use Microsoft's XMLHTTP object to retrieve the raw HTML code from a remote webpage on the Internet.

<%
Function GetHTML(sPage)
On Error Resume Next
Set objXMLHttp = Server.CreateObject ("Microsoft.XMLHTTP")
objXMLHttp.Open "GET", sPage, False
objXMLHttp.Send
If Err.Number = 0 Then
If objXMLHttp.Status = 200 then
GetHTML = objXMLHttp.ResponseText
Else
GetHTML = "Incorrect URL"
End if
Else
GetHTML = Err.Description
End If
Set objXMLHttp = Nothing
End Function
%>

<%=GetHTML("http://www.codefixer.com/app_mpV4_Paypal/default.asp")%>

Further reading http://www.eggheadcafe.com/articles/20010114.asp





If you have any code snippets to share with full credit given then send an email to Codesnippets - You'll receive full credit and a link back to your site.

ASP.NET 3.5/2.0 Web Hosting: 3 Months FREE – Click Here!




About | Contact | Advertise | Feedback | Hire Us | Link

Site developed by Michael Wall - Web Design Belfast N.Ireland.
Copyright © 2000-2008. All rights reserved.

Do you intend to move to ASP.NET or have you already?
Yes will do
Have done
ASP does fine
Not a priority


Directory Software