calling a cgi script from php

From: Date: Tue, 16 Jul 2002 23:57:10 +0000
Subject: calling a cgi script from php
Groups: php.general 
Request: Send a blank email to php-general+get-107982@lists.php.net to get a copy of this message
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

« previous php.general (#107982) next »