473,388 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Simulate post at webpage

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
2 2647
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Neo | last post by:
I have a usercontrol that I am trying to use as an ActiveX Control on a WebPage, however it refereneces an Assembly that whenever the first call is made to anything in the Assembly a Security...
3
by: q2005 | last post by:
Hi, all Is that possible I can do window.open("http://xserver1/app/typ/test/tesServer.php?aaa=111&bbb=222&ccc= 333","","") to simulate a POST ACTION with a form rather than a GET ACTION? Jack
4
by: Al Cadalzo | last post by:
I'm trying to simulate a form post (i.e. Method="POST"). The FORM POST I'm trying to simulate is similar to this: <FORM NAME=SearchForm METHOD=POST ACTION=Search> <SELECT name="criteriaA" >...
4
by: Abhishek | last post by:
Hi, I have a activex web browser embedded in a windows form and on a click of a form button i need the mouse to go the position for example 100, 100 and click the link that will be there on that...
0
by: barrybevel | last post by:
Hi, I'm trying to login to the www.vodafone.ie website using HttpWebRequest. It works fine with IE/Firefox and the .NET Web Control too, just not with my code. I think it's a redirect 302...
6
by: BarryX | last post by:
Hi, How do I simulate this from the server side: <form name="SearchForm" method="POST" id="SearchForm" action="http://SOMEURL/Search.ASP?Parm1=1&Parm2=2"> I have generally been posting data...
1
by: BarryX | last post by:
Hi, How do I simulate this from the server side: <form name="SearchForm" method="POST" id="SearchForm" action="http://SOMEURL/Search.ASP?Parm1=1&Parm2=2"> I have generally been posting data...
0
by: nospam | last post by:
Hello, I want to simulate posting to a form method with some data. I don't want to use query strings. I want to 'submit' to a php method with some form fields filled out on the server. So,...
12
by: andersond | last post by:
I have a webpage where a javascript routine swaps tables to "clear" the screen and start a new group of questions. After the screen is cleared a textbox or a drop-down menu can receive focus by...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.