Jump to content

Implementing Http Get In Tcp Functions


Recommended Posts

Hello,

I'm writing a program that makes lots of small HTTP requests (to Flickr) via InetGet. I imagine that doing things this way creates a fair bit of overhead in terms of creating connections and closing them again. Is it worth me writing a function that implements HTTP GET in TCP functions? Or is there some other way of speeding the process up? Any way of doing more than one request at a time would be very useful too. I used a compiled script that just wrapped InetGet to do this but it seems a bit hacky - and I'm not sure it really makes any difference.

ben

[edit: hey, that's weird. The board has 'sentence cased' my post title. Dammit, HTTP GET and TCP are abbreviations!]

Edited by ning
Link to comment
Share on other sites

Grabbed from my self-programmed server logs:

2006-03-19 20:13:10 : GET request recieved on port 80:

GET / HTTP/1.1

Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*

Accept-Language: en-us

Accept-Encoding: gzip, deflate

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)

Host: 220.255.59.229

Connection: Keep-Alive

2006-03-19 20:13:12 : GET request recieved on port 80:

GET /woodlogo.jpg HTTP/1.1

Accept: */*

Referer: http://220.255.59.229/

Accept-Language: en-us

Accept-Encoding: gzip, deflate

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.50727)

Host: 220.255.59.229

Connection: Keep-Alive

Try looking at the format of a GET request and figuring it out! Good luck!

#)

Link to comment
Share on other sites

Thanks. Useful information, but not really what I was asking. I'm sure I could find out how to make a GET request, and write the necessary code. The question is, is it worth it? Would that make things run all that much faster when I'm making several requests from the same server?

ben

Link to comment
Share on other sites

Hey, this just triggered an idea.

Since AutoIt's InetGet does not work on my computer, maybe I could try what you are asking for!

One advantage I see is that you have better control over the data.

If you are doing it for a lot of small data, I think there should be some speedup.

As for multipule connections, there is a program called CURL which allows you to do this.

Found here: http://www.autoitscript.com/forum/index.ph...ndpost&p=172034

#)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...