Bob Bedford <bedford1@YouKnowWhatToDoHerehotmail.com> wrote:[color=blue]
> "Nikolai Chuvakhin" <nc@iname.com> a écrit dans le message de
> news:32d7a63c.0409231119.67ecf63a@posting.google.c om...[color=green]
>> "Bob Bedford" <bedford1@YouKnowWhatToDoHerehotmail.com>
>> wrote in message news:<4152e181$0$21028$5402220f@news.sunrise.ch>.. .[color=darkred]
>>>
>>> I've a script that must "launch" an other script on some situations.
>>>
>>> firstscript.php:
>>> ...
>>> If ($newarticle)
>>> //launch secondscript.php
>>> ...
>>>
>>> The "secondscript.php" may take quite long, and is not necessary in
>>> "firstscript.php" to wait until it's finished. So how to launch
>>> secondscipt.php and continue the script, without waiting it to finish.[/color]
>>
>> You can do this, but you need administrator privileges on your
>> server. You have two options:
>>
>> 1. Launch the second script in the background via exec/wget:
>>
>> exec('wget
http://server.com/path/secondscript.php ' .
>> '--quiet -O /dev/null &');
>>
>> 2. Launch the second script in the background via command-line
>> interface:
>>
>> exec('php /path/secondscript.php &');
>>[/color]
> I've no EXEC right, or even system rights. how to do ?
>
> Bob[/color]
humm... If you ignore connection aborts in the second script you could call
it using Sockets... The request would be:
-----BEGIN HTTP-REQUEST BLOCK-----
GET /onlinepath/to/yourscript.php HTTP/1.1
Host:
www.yourserver.tld
------END HTTP-REQUEST BLOCK------
, using \r\n as line break.
Don't forget the empty line at the end (the query string will end with
"\r\n\r\n")!
--
Simon Stienen <http://dangerouscat.net> <http://slashlife.de>
»What you do in this world is a matter of no consequence,
The question is, what can you make people believe that you have done.«
-- Sherlock Holmes in "A Study in Scarlet" by Sir Arthur Conan Doyle