IchBistTod Posted June 3, 2010 Share Posted June 3, 2010 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] Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 3, 2010 Share Posted June 3, 2010 Connections now are by default keep-alive. You only specify if you want the connection dropped as soon as transmission finishes. Link to comment Share on other sites More sharing options...
IchBistTod Posted June 3, 2010 Author Share Posted June 3, 2010 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] Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 3, 2010 Share Posted June 3, 2010 Well your problem is probably the strings. AutoIt doesn't use \r\n. You need to use @CRLF. Link to comment Share on other sites More sharing options...
IchBistTod Posted June 3, 2010 Author Share Posted June 3, 2010 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] Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 3, 2010 Share Posted June 3, 2010 It might be because you've got a 33 hour timeout. I don't see any server honoring that. Link to comment Share on other sites More sharing options...
IchBistTod Posted June 3, 2010 Author Share Posted June 3, 2010 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] Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 3, 2010 Share Posted June 3, 2010 No, it's seconds. I wouldn't suggest over a minute. Even that might be a stretch. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now