1

I have a web application which I wrote in PHP. Each of my forms do an HTTP POST to a PHP file which processes the data and returns a result.

Now I want to use RAD Studio's Delphi XE4 to create an application which can be used on phones to perform basic functions on the site.

For example... I have a function in my PHP file called F.

F Does some calculations with parameters passed using the $_REQUEST[''] directive.

So my question is: is there a way that I can use Delphi to post to my website and return the result.

I've searched for similar requests but no-one seems to have done this before. I would even use a JavaScript file if someone can tell me how I can incorporate it?

I know jQuery has a $.ajax method, is there maybe a way to implement that?

w5m
  • 2,286
  • 3
  • 34
  • 46
Jacques Koekemoer
  • 1,378
  • 5
  • 25
  • 50
  • If you google for 'delphi webmodule' you'll find plenty of examples of apps that consume web services, either with HTTP GET or POST requests. Fidn an example, play with it, and come back with specific questions. – Jan Doggen Nov 15 '13 at 07:41
  • A Google search for "delphi post" revealed plenty of pertinent results i.e. at least the first 4 results showed code samples. What did you search for? – w5m Nov 15 '13 at 15:48

1 Answers1

3

I can assure you that you're not the first person to do an HTTP request via Delphi :)

You state that you're fetching the request data via $_REQUEST, so you'll get both POST and GET data, so perhaps these links might be of interest:

What's the simplest way to call Http GET url using Delphi?

What’s the simplest way to call Http POST url using Delphi?

Community
  • 1
  • 1
Wouter van Nifterick
  • 23,603
  • 7
  • 78
  • 122