Sign in to follow this  
Followers 0
Armand

Several Qs regarding HTTP1.1 protocols and viability

5 posts in this topic

hey there,

I would like to know what is the fastest way to get an internet page via HTTP1.1:

-. Using #include <IE.au3> to get the page in BG and then get the source from it [.body property]

-. Using simple InetGet to get the page downloaded and then just read it.

-. Creating a com obj - [winhttp.winhttprequest.5.1] and using it to get the page source.

-. Creating a com obj - [Microsoft.XMLHTTP] and using it to get the page source.

-. Creating a com obj - [MSXML2.ServerXMLHTTP] and using it to get the page source.

-. Creating a com obj - [WinHttp.WinHttpRequest] and using it to get the page source.

-. Using WinINET to do the job. [http://www.autoitscript.com/forum/index.php?showtopic=77503]

-. Using direct TCPConnect to connect the server and then sending a _GET request for the page.

-->> using TCPRecv. [what are the best setting for it ? is there a way to make it work in BG ?]

-> What's the difference between using a COM obj, and direct TCPConnecting to the server and send the same data as the COM obj does ?!

-> Doesn't InetGet uses the same functions as TCPConnect and TCPSend/TCPRecv ?! [And so does IE.au3]

-> Isn't using TCPConnect/TCPSend/TCPRecv the most basic way to communicate through HTTP1.1 protocols [or any other protocol at it?!]???

THANKS A LOT TO ANYONE WHO TOOK THE TIME TO EVEN READ IT!!!


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites



Hi,

Check out HTTP.au3 :P.

I'm not sure on what's the fastest, and I don't think anyone has tested this, so you will have to explore all of the different methods you wish to try explore, creating a simple script that grabs the page for example, and time it, recording the time. Post your testing script onto the forums (in this topic), so you can gain a wider set of results, and gain a better understanding of which is the fastest.

Cheers,

Brett

Share this post


Link to post
Share on other sites

Will sure do try it... however there is one issue... my maximal DL speed is 10KB/s so....

does anyone else knows anything about the differences between these?!


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

WinINet is an older set of APIs than WinHTTP, but is also compatible with older versions of Windows (WinHTTP requires Windows 2000 and newer). WinINet also supports more than just HTTP.

HTTP.au3 works okay, but is slower because it is implemented in pure AutoIt. I did manage to speed it up by a large factor before working on WinINet, but found it too difficult to maintain because of various factors like connection persistency, so that's what prompted me to work on WinINet instead. As well, HTTP.au3 doesn't support some more advanced functions out of the box, like HTTP authentication (you need a separate Base64 encoder UDF, and you need to modify the functions to accept username/password parameters, and then you need to add them to the request header string manually).

TCP*() functions... are used by HTTP.au3. They're lower-level functions that may not be well suited to performing HTTP-related functions (they can do it, obviously, as OverloadUT managed it, but they're not optimal).

InetGet() works fine for simple downloads, but isn't flexible (you can't control the actual HTTP request, just what you're downloading).

XMLHttp... if I'm guessing correctly, would be the XHR object used in AJAX. It's probalby much more limited in scope than WinHTTP or WinINet.

With regards to speed, I'm not too sure how the COM objects compare with WinINet's DllCall()s. HTTP.au3, as I alluded to, is rather slow, but can be made faster (but it'll still be slower than WinINet). TCP*()... well, they'll be as fast as HTTP.au3 can be, as HTTP.au3 is simply using them to perform HTTP-related functions. Obviously, though, the biggest bottleneck for ANY of the methods will be your connection speed.

Edited by -Ultima-

[ WinINet.au3 | Array.au3 (Optimized) | _UnixTimeParse() ]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0