473,732 Members | 2,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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?ter min_id_in=3678" ),
true, p, strlen(p));

int i = http.GetPageSta tusCode();

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 2687
This is off-topic here.

Try posting it to microsoft.publi c.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?ter min_id_in=3678" ),
true, p, strlen(p));

int i = http.GetPageSta tusCode();

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_atla s_DOT_de
Sep 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2093
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 Exception is throw. I am having a lot of trouble debugging this, because I cannot catch the exception in my code. However if I could run the control under the Internet Zone Security settings I could probably find this easily. Does anyone know how to...
3
8088
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
7082
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" > <OPTION VALUE=1>AAAAAAAAAAA</OPTION> <OPTION VALUE=2>BBBBBBBBBBBB</OPTION> </SELECT> ....
4
5494
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 position. i am usind the win api setcursonpos to set the mouse position assume that the link will always be there at 100, 100. how do i get Windows to create the click event.
0
12780
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 problem. I'm using this code in a ASP.NET 2.0 application just in case that matters, maybe someone knows a better way to do this?
6
12277
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 using: Set xml = Server.CreateObject("Microsoft.XMLHTTP")
1
2483
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 using: Set xml = Server.CreateObject("Microsoft.XMLHTTP")
0
1530
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, my web page has 2 forms - one 'runat' server and one HTML form. On a button click in the 'runat' form, I want to POST to the HTML form (which in turn calls my php method).
12
38862
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 simply getting the element by ID, ending in .focus(). No problem. However, if the first object on a screen is a radiobutton it will not accept focus unless there is a tab key press. How can I simulate a tab key press so the radiobutton can receive...
0
9447
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9307
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9181
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.