Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Sep : Re: Indy 8: HTTP server - Can it be used with PHP?
| Subject: | Re: Indy 8: HTTP server - Can it be used with PHP? |
| Posted by: | "Jamie Dale" (j.da..@turboz.net) |
| Date: | Tue, 26 Sep 2006 11:43:10 |
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:4518596e$1@newsgroups.borland.com...
>
> "Jamie Dale" <j.dale@turboz.net> wrote in message
> news:451847f7@newsgroups.borland.com...
>
>> I'm looking at using a IdHTTP server in my project to give it
>> a web based control interface aswell as a TCP connection
>> (for a TCP client interface).
>
> Indy 8 is a very old version that is no longer supported. You should
> upgrade to the latest Indy 9 or 10 snapshot version.
Yes I know lol. Trouble is after the greif I had with Delphi 2005/Indy
10/ASP.NET it kind of put me right off.
That and I've also seen numerous bugs being reported on these newsgroups for
the latest versions - I feel quite lucky with V8 because it actually works
and doesn't seem to be buggy. I may be wrong but heck it does the job for
me!
>> I was wondering if IdHTTP can work in conjunction with PHP
>
> PHP is an external application that your server code would have to
> execute.
> Indy (and HTTP in general) has no concept of PHP. Your server would
> forward
> the client's submitted data to the PHP executable, and then forward the
> PHP
> output back to the client.
Yes I realise that, but what I was asking is, is there a way to make the
IdHTTP server recognise what it should pass to PHP? - How can it be done?
etc. Basically I was kind of looking for any sample code which would give me
the first step on the ladder.
>> or if there is a way to get the IdHTTP server to understand the
>> input from a form and create an output accordingly?
>
> I cannot speak for Indy 8, but in Indy 9/10, the submitted form values are
> provided to your server code in a readibly avalable manner that your code
> can use directly, and then send data back to the client.
Cool. I'll have a tinker with the Indy 8 docs and see what else I can locate
(if anything).
>> I don't want to rely on dependencies (EG, SQL servers) so a basic
>> built-in HTTP server which can understand certain GET parameters etc
>> would be really great.
>
> Then you would not be able to use PHP, as that is a separate executable
> that
> would have to be installed on the server machine alongside your own
> application.
Well in ordinary circumstances, however I currently have a WAMP setup
(Windows Apache, MySQL, PHP) and it can be moved to any PC without
installation, run of USB drive etc. IT shouldn't be too hard to get PHP
working as it isn't even a service - it's simply called when needed. I
reckon using PHP is possible as long as I can somehow get IdHTTP to do it's
part!
Any more ideas Remy??