I've got a legacy html page <http://ttc.org.nz/tuesday.html> which calls a cgi (perl) script <!--#include virtual="/cgi-bin/tuesday.pl<http://ttc.org.nz//cgi-bin/tuesday.pl>" -->
As an interim step to replacing this script (with something clever from PmWiki) I've tried to invoke the script from within a recipe on a page<http://ttc.org.nz/pmwiki/pmwiki.php/TTC/Tuesday> . The recipe is Markup('ClubNight', 'fulltext', '/\\(:clubnight:\\)/ei', "Keep(ClubNight())"); function ClubNight() { $retval = 'retval is '; $lastline = ''; $output = ''; // Create a stream $opts = array( 'http'=>array( 'method'=>"GET", 'header'=>"Accept-language: en\r\n" ) ); $context = stream_context_create($opts); // Open the file using the HTTP headers set above $retval .= 'a' . file_get_contents('http://ttc.org.nz/cgi-bin/tuesday.pl', false, $context); $lastline = system ('http://ttc.org.nz/cgi-bin/tuesday.pl', $output); $retval .= 'b' . $output; $lastline = exec ('http://ttc.org.nz/cgi-bin/tuesday.pl', $output); $retval .= 'c' . $output; $lastline = exec("./cgi-bin/tuesday.pl", $output); $retval .= 'd' . $output; return $retval; } I don't get the result I expect on the page<http://ttc.org.nz/pmwiki/pmwiki.php/TTC/Tuesday> , and wonder if anyone can spot anything obvious that I have got wrong. I'm sure safe mode is on. tia Simon
_______________________________________________ pmwiki-devel mailing list pmwiki-devel@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-devel