Rev cgi & PHP - new question (shell command)

Alex Tweedly alex at tweedly.net
Thu Aug 25 16:25:50 EDT 2005


jbv wrote:

>OK folks, as I haven't got a single answer to my
>question posted yesterday, I'll try a new approach :
>  
>
I'll try ...

>Hi folks,
>
>Here's another dumb Rev cgi question (my favourites) :
>
>how can I trigger a PHP script from a Rev cgi script ?
>Both scripts will be on a Linux RH server and in the same
>domain.
>  
>
Is that "both will be on a [i.e. the same] server" or "both [each] will 
be on a server [i.e. could be two different ones] in the same domain" ?
Is it a PHP script you will (or have already) written ?

>Ideally, the Rev cgi script should pause while the php script
>is running and then resume when the php script ends; and the
>Rev cgi should be able to pass parameters to the php script
>(although I guess this can be done via a temp txt file)...
>
>What is the best Transcript approach to do that :
>    - get URL ?
>    - "open process" + "wait until the openprocesses is empty" ?
>    - other ?
>  
>
If they are on same machine, you could simply run it via shell or open 
process.
However, many PHP scripts will be already set up to get their parameters 
via URL options, so it may be easier to to do
   get URL 
("http://the.other.server.thisdomain.com/phpscript?arg1=value&arg2=val")
(watch out for quoting and urlencoding etc.)
and this might be easier even if it is the same server.


-- 
Alex Tweedly       http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.15/80 - Release Date: 23/08/2005




More information about the use-livecode mailing list