[Asterisk-Users] AGI Rocks!! (A happy camper)

Brancaleoni Matteo mbrancaleoni at espia.it
Tue Nov 25 15:47:12 MST 2003


Why bothering with fopens....

with php 4.3+ (where the php from cli
is stable... and I suggests not to using
any php version prior to 4.3 for scripting),
you have already stdin & stdout streams opened...

so just do
fwrite(STDOUT,"blah")
or 
fget(STDIN, blah blah blah....

also using ob_implicit_flush is redundant...
simply isn't needed at all

and...

don't, really don't, use echo() for
sending commands....

bye


> You need to open stdin and stdout to the PHP script..
> 
> $stdin = fopen('php://stdin', 'r');
> $stdout = fopen('php://stdout', 'w');
> 
> also make sure you start the script with
> 
> ob_implicit_flush(false);
> set_time_limit(5);
> 
> later..
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
Brancaleoni Matteo <mbrancaleoni at espia.it>
Espia - Emmegi Srl




More information about the asterisk-users mailing list