Sign in to follow this  
Followers 0
IchBistTod

get source of a page via TCPCONNECT

8 posts in this topic

I want to get the source code of a webpage via tcp connect, however I cant find the proper way to format a header with the "keep-alive" option.

help please?


[center][/center][center]=][u][/u][/center][center][/center]

Share this post


Link to post
Share on other sites

Connections now are by default keep-alive. You only specify if you want the connection dropped as soon as transmission finishes.

Share this post


Link to post
Share on other sites

here is my header

"GET $page HTTP/1.0\r\n";

"Host: $url\r\n";

"Keep-Alive: timeout=120000, max=150000\r\n";

"Accept-Language: en-us, en;q=0.50\r\n";

what is wrong with it?


[center][/center][center]=][u][/u][/center][center][/center]

Share this post


Link to post
Share on other sites

Well your problem is probably the strings. AutoIt doesn't use \r\n. You need to use @CRLF.

Share this post


Link to post
Share on other sites

Well your problem is probably the strings. AutoIt doesn't use \r\n. You need to use @CRLF.

I know this, ignore the formatting, i transfered it over to php to see if I could get it to work in php, and the header doesnt work in php or autoit(using their respective linebreaks \r\n for php and @CRLF for autoit)


[center][/center][center]=][u][/u][/center][center][/center]

Share this post


Link to post
Share on other sites

It might be because you've got a 33 hour timeout. I don't see any server honoring that.

Share this post


Link to post
Share on other sites

It might be because you've got a 33 hour timeout. I don't see any server honoring that.

I thought those were MS, lol...

Whats the highest I can go on a keep alive?


[center][/center][center]=][u][/u][/center][center][/center]

Share this post


Link to post
Share on other sites

No, it's seconds. I wouldn't suggest over a minute. Even that might be a stretch.

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