RE: [PHP] calling a cgi script from php

From: Date: Wed, 17 Jul 2002 01:05:36 +0000
Subject: RE: [PHP] calling a cgi script from php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-107999@lists.php.net to get a copy of this message
How about using the virtual() function? www.php.net/virtual ---John Holmes... > -----Original Message----- > From: rdkurth@starband.net [mailto:rdkurth@starband.net] > Sent: Tuesday, July 16, 2002 7:57 PM > To: php-general > Subject: [PHP] calling a cgi script from php > > Hello , > > I am trying to call a cgi script from a PHP script and get it to return > some data. > I am using the script below but it does not seam to work. > The cgi script (or I should say function) I am trying to call is in a > perl pm file. I have include a copy of the function I am trying to > call. Does anybody know what I am doing wrong. > > $username= "sdfsfs"; > $cmd="/usr/lib/perl5/site_perl/5.005/Email.pm::mail_virtuser_get_byuser > $username"; > $returndata=exec($cmd); > echo $returndata; > > > > > sub mail_virtuser_get_byuser > # Parses a list of aliases a user owns > # Arguments: username > # Return value: Array of aliases > { > my($username) = @_; > my(%virtuser) = Email::mail_virtuser_list_alias(); > my($alias,$user,@alii); > foreach $alias (keys %virtuser) { > push(@alii,$alias) if ($virtuser{$alias} eq $username); > } > return(@alii); > } > > -- > Best regards, > rdkurth mailto:rdkurth@starband.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#107999) next »