By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 1,871 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

Simulate post at webpage

P: n/a
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.

Sep 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
This is off-topic here.

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

--
EventStudio 2.5 - http://www.EventHelix.com/EventStudio
Generate Sequence diagrams from a simple declarative language

Sep 15 '05 #2

P: n/a
dast wrote:
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.
--
Stefan Naewe
naewe.s_AT_atlas_DOT_de
Sep 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.