cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Possible to POST code to Apache and stdout the response?

From: Mike Lott <lists.accounts_at_gmail.com>
Date: Mon, 18 Sep 2006 13:55:43 +0100

Hi Tim

Thanks for the reply.

I did consider this as an option, however, I feel that it is too risky
in that the service [in this case Moodle] is being served from a user's
home directory, as the agreement is that they are administering that
particular service, and they might actually delete the test.php file.
However, it has just struck me as I write this, that all I need to
really do is change ownership of that file I guess, or have another
virtual host that serves the php file.

I am still curious as to whether my initial idea is possible though. Any
takers?

Mike

Tim Schwartz wrote:
> Why not run the script on the sever itself... curl
> http://127.0.0.1/test.php and if you get the response your looking for
> then your php is working fine. there should be no need to go over the
> network for this nor "post some PHP code to the Apache webserver".
>
> -tim
>
> On 9/18/06, *Mike Lott* <lists.accounts_at_gmail.com
> <mailto:lists.accounts_at_gmail.com>> wrote:
>
> Hi there
>
> This is what I would like to achieve if possible:
>
> I would like to use cURL within a shell script to post some PHP code to
> the Apache webserver, for Apache to process this code, and to then
> return this to cURL, and to output the result. The PHP code would be
> something simple like this:
>
> <?php
> $txt = "Getting a response from Apache/PHP";
> echo $txt;
> ?>
>
>
> The idea behind this is that the shell script would be a monitor for PHP
> that would be run via cron [actually it would be handled by Launchd - I
> am using OS X Server v10.4.7], and if in the event of a PHP crash, I
> could then set in process a series of scripts preparing the server for
> failover.
>
> Does anyone know if this is possible?
>
> Mike
>
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2006-09-18