Submitting Variables from a Delphi EXE to a Web Page

Hello
Looking for the easiest way to submit a variable generated from within a Delphi application (standalone exe) to a web page, where it is processed by an ISAPI dll, and the processed value returned to the application. Done a lot of Delhi development, but not much in the way of web programming. Can anyone help?

I have to design everything from scratch - a portion of the exe, ISAPI, and web page. The whole thing boils down to the following process:
1. I click a button in the exe and this opens a web page on which a Web app (dll) resides. An integer variable is submitted from the exe to the web page to be used by the dll.
2. The dll uses the variable to calculate a return value. (also integer)
3. This return value is passed back to the exe and displayed in a text box on the exe GUI.

I know this is almost like requesting a tutorial, but the Delphi documentation do not offer much in the way of examples (is this an understatement??) and I need to have a clear understanding of the principles involved before diving in and making a hash of it. Since the architecture of the ISAPI is not cast in stone yet, I am open to suggestion as to the best way to proceed.

Are you against using something like PHP instead of ISAPI? PHP is very easy to use and learn and very easy
to setup on your web server or find a host that provides it.

I use PHP on a site that I maintain for a local baseball league and can use a Delphi to update the scores in
a mySQL database using idHTTP from Indy.

Without having something to test against, you may be grasping at straws. I agree with alikoank that you submit
the values either in a GET request, where the values you want to pass are in the URL, or in a POST where the
values will be sent via PostVars.

Thanks for the responses. It seems that GET and POST as described by alikoank will do the trick - the required function to be fulfilled by the dll is not very complex. Of PHP I know the proverbial zero - could you direct me to a GOOD reference site for more info?

Basically what the EXE does is to present the web page with an integer code generated from a variety of computer hardware and software serial numbers, which is then reworked and converted into an encrypted integer code and passed back to the EXE. This unlocks certain functionality on the EXE. (converting the program from a demo to fullly functional version). I am not fluent in either Java or C, but did some extensive study of HTML, XHTML and XML to get acquainted with web page architecture a couple of weeks ago. Must say I found those quite easy - also had a quick look at some Java scripts which did not appear totally confusing.

My main concern at this point is just to get the job done as quickly as possible - a value must be passed from the EXE to the web page, and another back to the EXE, preferably within the framework of my knowledge of Delphi and HTML. By the way, the web page will be hosted on a computer running some flavour of Unix - so my dll will be developed cross-platform and compiled in Kylix.

Why go to the trouble of building the ISAPI when you can have PHP running in < 1 hr.

If you give me some sort of idea how to manipulate the data, including some sample
input and what you are expecting as output, I could probably write something up in PHP
fairly quickly. Then I could show you how to pass this info from the Delphi EXE to the PHP
script and get the result back into the EXE.

Hi Eddie
For the purposes of illustration, let us keep the number crunching simple. Let's say the EXE outputs a 6-digit value 654321 and assigns it to a global integer variable idNum in the EXE. This value is passed to the web page, where it is converted into a string variable, idStr. The string is then dissected into single digits, each of which is again changed into integer, and multiplied with its position in the string, and added up. (I.e. 6x1 + 5x2 + 4x3 + 3x4 + 2x5 + 1x6) This total is added to the original idNum value and returned to the exe to be displayed in an Edit box, say EditCode. That's it. I should be able to follow the logic.

Featured Post

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

A lot of questions regard threads in Delphi.
One of the more specific questions is how to show progress of the thread.
Updating a progressbar from inside a thread is a mistake.
A solution to this would be to send a synchronized message to the…

In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work. Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…

Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message. In the To field, type your recipient's fax number @efaxsend.com.
You can even send a secure international fax — just include t…