#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Location
    Texas, US
    Posts
    9
    Rep Power
    0
    I'm trying to write an SSI script that displays a random image. If I have to I'm content with making the page with an .shtml ext, but I've seen pages with an .html extension using the image tag
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre><img src="cgi-bin/script.cgi?blah">[/code]
    If possible I'd like to know howto do it that way.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 1999
    Location
    London
    Posts
    110
    Rep Power
    0
    or alternatively you could try it like this...
    <script language='javascript'>
    var IE4=(document.all) ? 1 : 0;
    var NN4=(document.layers) ? 1 : 0;
    if (IE4) {
    var theSource='<iframe id="Floating" src="whatever.com/cgi-bin/script" width=468 height=61 FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=no></iframe>'
    document.write(theSource)
    } else if (NN4) {
    var theSource='<layer id=Floating src="whatever.com/cgi-bin/script" width=468 height=61 style="position:absolute; top:94; left:174;"></layer>'
    document.write(theSource)
    } else {
    var theSource='<img src="static.gif">'
    document.write(theSource)
    }
    </script>
    <noscript><img src="static.gif"></noscript>

    somebody else suggested this in this forum and it work fine for me (I needed to create a dynamically created html banner depending on the user details to go across mulitple sites). the only thing I added was in case there was neither of the two browsers or no javascript.
    tried it in ie, netscape, opera and lynx and it worked fine..


    hth


    ------------------
    cheers
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Location
    Texas, US
    Posts
    9
    Rep Power
    0
    Thanks, however I already found out howto do it via CGI/PERL instead of JavaScript. However now that I have the script working, I want to make sure people cannot steal my bandwidth. I was told to use HTTP_REFERER, but I can't seem to find anything about it anywhere.

IMN logo majestic logo threadwatch logo seochat tools logo