Gossamer Forum
Home : Products : Gossamer Links : Discussions :

SSI within PHP Pages

Quote Reply
SSI within PHP Pages
Greetings All!

I've been experimenting with trying to get links.cgi programs working within PHP files. The simple ones work quite well. The problem seems to occur though when I try to use some specific options. This is what does work:-

Code:
<?php
$result = exec("/path/to/links/review.cgi", $out1);
array_shift( $out1 );
array_shift( $out1 );
$out2 = join( "\n", $out1 );
print($out2);
?>
The problem arises when I add anything after review.cgi or user.cgi etc. eg. review.cgi?ID=1234. The same with page.cgi.

Anyone got any ideas what is happening here?

Thanks,


Clint
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] SSI within PHP Pages In reply to
Hi,

You would probably wanna run it using a global (in static, and dynamic pages);

run_php_script
Code:
sub {
return system("php $_[0]")
# if that doesn't work, try:
# return `php $_[0]`;
}

Then call with:

Code:
<%run_php_script('/path/to/script.php')%>

Hope that helps

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!