in reply to Passing variables from PHP to Perl using passthru()

Hi,

Use the following to insert the output of a calling to a perl.cgi (just as any other cgi-bin calling) directly into an HTML page...

<?php global $host; $host=empty($_SERVER['HTTP_HOST'])? 'http://'.$HTTP_SERVER_VARS['HTTP_ +HOST']:'http://'.$_SERVER['HTTP_HOST']; ; include($host."/cgi-bin/fortune.cgi?add") ; //php calls Perl cgi & lo +ads JS vars ?>
And do the following to get your resulting values (allways in an array) from a simple command line call to a perl script:
<?php $command='perl d:\xampp\htdocs\modperl\riset.pl'; $array = exec($command); list($rises,$sets,$tmoon)=explode("|",$array); ?>
This should help.Should this be another snippet? Nah, it's PHP!

.{\('v')/}   C H E E R   U P !
 _`(___)' ___a_l_b_e_r_t_o_________
Wherever I lay my KNOPPIX disk, a new FREE LINUX nation could be established.