I have a big problem on my hands. On every webpage(.shtml) on my website I have a SSI in the footer that calls a cgi script that pastes html code thus making it easier to update the webpages. Now, inside that html code, I want to call a cgi or php AD rotator script. The problem is, can this happen? I don't want to put the calling of the AD script on every page, because I may change the script and use another one.
I am moving this to the php forum for more help.
I for one am on virtualave.net and I know that they don't allow includes inside of includes. I think that most people don't because that would give you the chance of having a file include itself, which would send the server into a recursive loop and mess it up a lot. But I'm not too sure...
Does anybody still know if my problem can be solved and how? Thanks...
The only way I can think of doing it is if you put your call on everypage to a script that you make yourself or someone makes for you (very simple though.. I could do it in PHP, but probly not Perl), that will include the file itself, but as a script and not SSI and therefore it would be allowed. I think that would work, it depends though. What kind of stuff does your host allow?
Unless you want to restructure how your pages work, and redo the cgi script in PHP or some other script language.. I don't think you have many options.
Do you know PERL/CGI? If so, you could add a small function that calls the AD rotator script. So your .shtml page would then stay the same, and call the CGI script which would write the HTML.
1) .shtml page is parsed by server
2) SSI include runs CGI script
3) CGI script does its think and starts writing out HTML code.
4) At the end of the CGI script, your new function gets executed, and the ad rotator code gets written.
5) Finished HTML is sent to the client's browser for display.
So then to change your ad rotator, you would just replace the function in your CGI program.