Welcome to Geeklog, Anonymous Tuesday, December 24 2024 @ 11:34 am EST
Geeklog Forums
Geeklog vs CGI
Anonymous
Anonymous
Is it possible to make cgi/perl-calls from geeklog?
8
7
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Of course (that's actually a PHP question ...).
Something like
function phpblock_perloutput() {
$result = `/path/to/your/perl/script.pl`;
return $result;
}
could be used to get the output of a Perl script into a PHP block in Geeklog (note the use of the backquotes ` which are not to be confused with the single quotes ').
bye, Dirk
7
10
Quote
Anonymous
Anonymous
Is there any other way for adding cgi-scripts with geeklog? Like after a search-form written in perl - I don't want to see the result in a new window. Can I make a call that keeps the result in geeklog?
(My english is not so good but I hope you know what I mean )
7
8
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Actually, I'm not sure if I understand what you're after ...
If you want to wrap the output of a Perl (or whatever) script into Geeklog (i.e. have the header, footer, and blocks of Geeklog but the output of the script in the middle of the screen) then that can be easily accomplished:
require_once('lib-common.php');
$display = COM_siteHeader('menu');
$display .= COM_startBlock("My CGI Output"
$display .= `/path/to/your/perl/script.pl`;
$display .= COM_endBlock();
$display .= COM_siteFooter();
echo $display;
Put that in a .php file (and don't forget to add the opening and closing PHP tags).
Is that what you're after?
bye, Dirk
11
7
Quote
All times are EST. The time is now 11:34 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content