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

curl-and-php

Possible to POST code to Apache and stdout the response?

From: Mike Lott <lists.accounts_at_gmail.com>
Date: Mon, 18 Sep 2006 12:48:03 +0100

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
Received on 2006-09-18