March 7th, 2003, 10:56 AM
POST with socket()
hello guys ,
im trying to write some code that will automatically check my webmail account for me. One of my acounts is at hotmail.com , and the problem i am getting here is logging into my hotmail account.
Basically i want to log into this account via a socket(). Ive read through the HTTP /1.0 RFC . The method is POST and ive looked up the names of the fields for username and password. , but i cant login
The problems i might be having are :
1 .not POSTING to the right script/place.
2. not making the a valid request ( i.e the syntax is wrong)
3 . something else has gone wromg.
Basically this is the POST request i send in the socket :-
POST /ppsecure/post.srf HTTP/1.0\n\nContent-Type: application/x-www-form-urlencoded\nContent-Length: 80\nlogin=myemail&domain=hotmail.com&passwd=12345678
and it usually returns the error as , page not found or something,
*note , i get this data because i , got = recv(sock,buff,sizeof(buff) , 0); and then , printf("%s\n" , buff); , so i know what it prints out , i.e what the error/reply was
can anyone tell me what im doing wrong?
how can i get logged into my account via a socket?
im terribly sorry for the long post.. :(
thanks for any help provided :P