I'd recommend moving the post data (the really long string) into, at least, a char *, and get the size of it by calling strlen() or the equivalent of whatever type you put it in. That'll reduce errors, let you change it in the future, and allow you to generate it dynamically if need be.
Also, you see to have things like &pkg=%22%22 - for clarification, if the HTML code has:
, then it has no value. The quotes merely surround the value, so the respective post data would be &pkg=&name_of_next_variable... the quotes could be throwing Y! off.Code:<input type="hidden" name="pkg" value="">
One of the variables is named "challenge". You might want to check if this perhaps changes, or if there are any cookies that perhaps the initial login page is sending. The value may also be randomized so that you have to get the initial login page, parse through it, and send the values that Y! sends you.
As for the connection reset, I believe it just means that the connection was closed. It's nonetheless odd - I would've expected at least a HTTP response that had an error enclosed.
Best of luck.
EDIT: Scratch what I said about stepid - I was logged in.