flat assembler
Message board for the users of flat assembler.

Index > Main > submitting requests to web server

Author
Thread Post new topic Reply to topic
zhak



Joined: 12 Apr 2005
Posts: 501
Location: Belarus
zhak 25 Aug 2009, 14:05
Hi guys, I'm not familiar with web programming, and there's one thing that interests me. for example, we have a web page somewhere at http://webpage.com/page

there's a text box and a button on the page. i input 2+2 in the text box and click the button. the result (4) is then displayed on a new page.

my question is: is it possible to write a small program (i.e. win32) that can submit 2+2 to the server and get the result?

thanks a lot
Post 25 Aug 2009, 14:05
View user's profile Send private message Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek 25 Aug 2009, 14:18
The LINK doesn't work, but is not a problem.

Yes, is possible, but you have to know an important thing:
How does your program comunicate with the server?
What protocol and service it uses (TCP, UDP,... HTTP, ecc.,..)


If you use the HTTP (throught TCP) you have to send requests to server via HTTP commands, like GET, and after recived the response from the server, your program should read the right data you want (for example, from an HTML web page response data)

For a faster program you can make your own server program that receves your data and responses only with the results you want.
Write a program that listen to 80h port (the server) and receves your special data and after it resends to your client program a TCP packet with only the result.


If you want some codes examples, tell me. (HTML code or PURE data)
Post 25 Aug 2009, 14:18
View user's profile Send private message Send e-mail Reply with quote
mangler



Joined: 02 Mar 2015
Posts: 6
mangler 02 Mar 2015, 13:39
hi there, can u please provide some example of sending HTTP post on server using TCP? thank you
Post 02 Mar 2015, 13:39
View user's profile Send private message Reply with quote
mangler



Joined: 02 Mar 2015
Posts: 6
mangler 02 Mar 2015, 13:40
or any simple text message (TPC/UDP)
Post 02 Mar 2015, 13:40
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.