Hi
Im currently trying to write a program that will connect and login to site with http. When logged in, I want to access xml-data at the site.
I've decided to use WinHttp, but I not quite sure what to do to make it work.
The site I want to access is www.hattrick.org. Login procedure:
http://195.149.159.158/Common/defaul...sword=PASSWORD
then then you can access for example:
http://195.149.159.158/Common/league...eLevelUnitID=1
code:
**********
hSession = WinHttpOpen( L"A WinHTTP Example Program/1.0",
WINHTTP_ACCESS_TYPE_DEFAULT_PROXY,
WINHTTP_NO_PROXY_NAME,
WINHTTP_NO_PROXY_BYPASS, 0 );
hConnect = WinHttpConnect( hSession,
L"www.hattrick.org",
INTERNET_DEFAULT_HTTP_PORT,
0 );
hRequest = WinHttpOpenRequest( hConnect,
L"GET",
L"http://195.149.159.158/Common/default.asp?action=login&loginName=USERNAME&passwo rd=PASSWORD",
NULL,
WINHTTP_NO_REFERER,
WINHTTP_DEFAULT_ACCEPT_TYPES,
0 );
**********
I dont know what to do next. I want to access the 'other' sites to gater xmldata, but I dont know how to do it.
I am even not sure if Im logged in, I have used GetLastError() but it returns no error code.
Any suggestions?



LinkBack URL
About LinkBacks


