Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 6th, 2000, 01:43 PM
jltumlinson jltumlinson is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Location: Texas, US
Posts: 9 jltumlinson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to jltumlinson Send a message via MSN to jltumlinson Send a message via Yahoo to jltumlinson
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.

Reply With Quote
  #2  
Old April 7th, 2000, 10:06 AM
timbo timbo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 1999
Location: London
Posts: 110 timbo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 26 sec
Reputation 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

Reply With Quote
  #3  
Old April 8th, 2000, 02:28 PM
jltumlinson jltumlinson is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Location: Texas, US
Posts: 9 jltumlinson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to jltumlinson Send a message via MSN to jltumlinson Send a message via Yahoo to jltumlinson
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Random Image using SSI

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap