Forum Moderators: coopster & phranque

Message Too Old, No Replies

Banner/link rotation Perl

Script won't execute

         

keyplyr

5:59 am on Sep 30, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This is supposed to work, originally set up for text but I modified it to deliver banner images with links, as exemplified here:

[bignosebird.com...]

So far it won't execute, any suggestions?

#!/usr/bin/perl
$¦=1;
$mypic[0]="/banners/ama.gif WIDTH=468 HEIGHT=60";
$myurl[0]="http://www.amazon.com/exec/obidos/redirect?tag=apassforjazz&path=ts/browse-music/34";
$mypic[1]="/banners/jazzani1.gif WIDTH=468 HEIGHT=60";
$myurl[1]="http://www.sheetmusicplus.com/a/banner.html?id=33880";
$mypic[2]="/banners/bmbanner.gif WIDTH=468 HEIGHT=60";
$myurl[2]="/page6.html";
$mypic[3]="/banners/kbj.jpg WIDTH=468 HEIGHT=60";
$myurl[3]="http://www.amazon.com/exec/obidos/redirect?tag=apassforjazz&path=tg/browse/-/496934";
$mypic[4]="/banners/transcribe2.gif.gif WIDTH=468 HEIGHT=60";
$myurl[4]="http://www.SellShareware.com/ProgramInfo.asp?AfID=2472&PrID=9500";
$mypic[5]="/banners/shamrock49 WIDTH=468 HEIGHT=60";
$myurl[5]="http://www.shamrock49.com/";
$mypic[6]="/banners/nextcard2.gif WIDTH=468 HEIGHT=60";
$myurl[6]="https://my.nextcard.com/nc/raf/raf.asp?ref=NCA0818215&promo=raf";
srand(time ^ $$);
$pick = rand(@mypic);
print "Content-type: text/html\n\n";
print "<A HREF=\"$myurl[$pick]\"> <IMG SRC=$mypic[$pick]></A>";

Thanks,
D C

gethan

10:22 am on Sep 30, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have all the obvious things been checked?

unix:
chmod 755 burp.cgi? (execute permission for everyone?)

Is it in the correct directory?

Finally - if you've copied and pasted the code sometimes control characters on the first line confuse things... try

#!/usr/bin/perl -w

keyplyr

6:30 pm on Sep 30, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



My server's tech support double-checked the path and set-up and yes they are correct. However, they do not offer programming help. Neither does BNB (where the script came from.) There is a Board to post at over there, but most all requests go unanswered or the equivelant (unlike here.)

Thanks,
D C

update: I got it working