Simulate post at webpage

D

dast

I want to simulate an input and post into a web page and than download
the web page that is opened after the correct input! The web page
exists of an user input form with userid and password, after input the
correct data and pressing the submit button another web page will be
opened.

I have tried to download the web page with the following code (I am
using the CAmHttpSocket class at
http://www.codeproject.com/internet/amhttputils.asp):

int _tmain(int argc, _TCHAR* argv[])
{
CAmHttpSocket http;

char* p = "userid=xxx&pwd=xxx";

char* s = http.GetPage(
_T("https://orawww.uibk.ac.at/public_prod/owa/pk205.frame_lv_termine_lzk?termin_id_in=3678"),
true, p, strlen(p));

int i = http.GetPageStatusCode();

printf("%s\n", s);

printf("%d\n", i);

return 0;
}

My problem is that I don't know how to simulate the input and pressing
the submit button!

How can I pass the userid and the possword?

Regards,
Daniel.
 
E

EventHelix.com

This is off-topic here.

Try posting it to microsoft.public.vc.mfc newsgroup.
 
?

=?ISO-8859-1?Q?Stefan_N=E4we?=

dast said:
I want to simulate an input and post into a web page and than download
the web page that is opened after the correct input! The web page
exists of an user input form with userid and password, after input the
correct data and pressing the submit button another web page will be
opened.

I have tried to download the web page with the following code (I am
using the CAmHttpSocket class at
http://www.codeproject.com/internet/amhttputils.asp):

int _tmain(int argc, _TCHAR* argv[])
{
CAmHttpSocket http;

char* p = "userid=xxx&pwd=xxx";

char* s = http.GetPage(
_T("https://orawww.uibk.ac.at/public_prod/owa/pk205.frame_lv_termine_lzk?termin_id_in=3678"),
true, p, strlen(p));

int i = http.GetPageStatusCode();

printf("%s\n", s);

printf("%d\n", i);

return 0;
}

My problem is that I don't know how to simulate the input and pressing
the submit button!

How can I pass the userid and the possword?

Regards,
Daniel.

This is OT here, but you might want to look at 'wget' or 'curl'.

/S.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top