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

curl-and-php

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

From: Tim Schwartz <timatron_at_gmail.com>
Date: Mon, 18 Sep 2006 08:11:20 -0400

Why not run the script on the sever itself... curl
http://127.0.0.1/test.phpand 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> 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
Received on 2006-09-18