Forum Moderators: coopster

Message Too Old, No Replies

assigning perl's output to php variable

         

macdar

11:07 am on Aug 21, 2007 (gmt 0)

10+ Year Member



continuing from:
[webmasterworld.com...]

I have a perl script that retrieves country name based on an ip. I need to pass it on to my php code as a variable.

I tried php's Perl extension but that won't work (as it's described in the previous post).

The "virtual" function almost does its job, however it does not work with ob_start (so I can not assign it to var) [bugs.php.net...]

that looks very simple: I only need to assign perl's output to php variable.

How do you guys accomplish that?

thanks,
D.

Little_G

11:16 am on Aug 21, 2007 (gmt 0)

10+ Year Member



Hi,

Have you tried shell_exec [php.net]?

Andrew

d40sithui

11:55 am on Aug 21, 2007 (gmt 0)

10+ Year Member



this is quite an interesting question.
i'd like to know how to do this as well. for now, the only way i can run php/perl together is using frames. if you just want to output perl, you can try this method..idk if this will help, but feel free to expand to your liking/functionality

--index.php--
<?
$link = "mylink.cgi?id=$id&state=$state...";
?>
<frameset>
<frame src="<? echo $link;?> ">

</frameset>