Forum Moderators: coopster
<!--#exec cmd="cgi-bin/entropybanner.cgi"-->
I want the banners to appear at the top of an SMF forum and I have tried different ways, none of which worked.
include 'entropybanner.cgi';
include 'cgi-bin/entropybanner.cgi';
Here is the area where the banner code should go.
<td valign="bottom" align="left" style="padding-top: 6px;"><img src="' ,$settings['images_url'], '/logo5a.gif" /> </td>';
echo ' <td valign="bottom" align="right">';
include ' cgi-bin/entropybanner.cgi';
echo ' </td></tr></table>';
I'm a novice so it may be something real simple.
Thanks for any help,
Ron.
There are other ways to get that value though. You may still be able to use include [php.net] with the full 'http://example.com/cgi-bin/my-cgi-script.cgi' path.
I did not think the virtual would work but at this point I am willing to try most anything. It's just a simple entropybanner.cgi code that displays a banner at the top of the page so I don't get it.
include your file as
[yourwebsite.com...]
if if in any case, that doesnt do as expected then try this.
ob_start();
include "http://yourwebsite.com/cgi-bin/yourscript.cgi";
$data=ob_get_contents();
ob_clean();
echo $data;
what that will do is, it will call your CGI script as browser request, will grab output from it and save in variable $data. then you can echo that $data anywhere in your code, and that for sure will be the output of your cgi script ;)