Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP.NET (Non-Forum Related)
 Screen Scraping Performance Choices
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

dayve
Forum Moderator

USA
5820 Posts

Posted - 31 October 2003 :  00:26:58  Show Profile  Visit dayve's Homepage
I have used both of the following in the past:

XML
HTMLGet = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
HTMLGet.Open("GET", "http://www.somerandomsite.com", false)
HTMLGet.Send
strText = HTMLGet.responseText
HTMLGet = Nothing


.NET
objRequest = System.Net.HttpWebRequest.Create("http://www.somerandomsite.com")
objResponse = objRequest.GetResponse()
Dim sr As New StreamReader(objResponse.GetResponseStream())
strText = sr.ReadToEnd()
sr.Close()


Pro and Cons of both?

davemaxwell
Access 2000 Support Moderator

USA
3020 Posts

Posted - 31 October 2003 :  06:51:41  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message
Considering the .NET version will be compiled, that way SHOULD run faster than the asp classic method. You'd have to run metrics to find out for sure however.

Dave Maxwell
Barbershop Harmony Freak
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 31 October 2003 :  17:17:56  Show Profile  Visit Gremlin's Homepage
I'd guess that trying to measure them would be difficult anyway becuase the completion of the function is dependant on the latency/time to scrape the destination page.

Personally I'd say go with what your most comfortable using as I suspect the actual performance differences are negligible anyway (opening myself up to be horribly wrong when someone works out a good way to test the difference)

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 31 October 2003 :  18:02:11  Show Profile  Visit dayve's Homepage
would you happen to know which option gives me more flexibility and options to use with it? I can't seem to find decent references.

Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 31 October 2003 :  18:18:03  Show Profile  Visit Gremlin's Homepage
I think they both offer identical functionality from what I've read (I've not used the .NET version myself)

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

DavidRhodes
Senior Member

United Kingdom
1222 Posts

Posted - 31 October 2003 :  18:34:02  Show Profile
I did a program for work last year to do with search engines, basically it looped a set of keywords for a chosen company, and for each keyword looped about 10 search engines each using the code above, eg Company Acme, 5 keywords, 10 search engines = 50 Web Requests. The program was original specced for VB6 but I had to make an ASP.NET webservice to do the Web Requests because the XML object wasn't stable enough, then call the webservice from a VB6 client using SOAP.

The project never really got finished but the next stage was to do the Web Requests assyncronously, which can only be done in .NET easily.

The UK MkIVs Forum
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.13 seconds. Powered By: Snitz Forums 2000 Version 3.4.07