SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member franjieh's Avatar
    Join Date
    Aug 2000
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    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.

  2. #2
    SitePoint Wizard edshuck's Avatar
    Join Date
    Jul 2000
    Posts
    1,198
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    I am moving this to the php forum for more help.

    peace

  3. #3
    SitePoint Addict
    Join Date
    Nov 2000
    Location
    London, UK
    Posts
    223
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm..
    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...

    ... what's the world coming to?

  4. #4
    SitePoint Member franjieh's Avatar
    Join Date
    Aug 2000
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does anybody still know if my problem can be solved and how? Thanks...

  5. #5
    SitePoint Addict
    Join Date
    Nov 2000
    Location
    London, UK
    Posts
    223
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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?

    ... what's the world coming to?

  6. #6
    Confirmed Halfwit
    Join Date
    Oct 1999
    Location
    Vancouver, BC, Canada
    Posts
    983
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

    ie:
    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.
    - A simple online WYSIWYG editor for HTML code snippets.
    - Managed Web Hosting - $3.95/month (resellers welcome)
    - Why pay more? $8.95 domains & $9.95 SSL certificates!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •