Need Help!! - Urgent!
Could someone please tell me what's wrong with this script?
#!/usr/bin/perl
$num = int( rand(89)) + 10;
print <<CODE;
document.write ('<A HREF="http://www.url.to/my/banner/exchange.cgi?advert=NonSSI&page=$num" TARGET="_top">');
document.write ('<IMG SRC="http://www.url.to/my/banner/exchange.cgi?ID=$ENV{'QUERY_STRING'}&page=$num" BORDER="0" WIDTH="468" HEIGHT="60"><BR>');
document.write ('</A><A HREF="http://www.url.to/my/banner/exchange/" TARGET="_top">');
document.write ('<IMG SRC="http://www.url.to/my/banner/exchange/logo.gif" BORDER="0"></A>');
CODE
It used to work great, but now all of a sudden it's not working! It's used by my banner exchange members so they can call their banners like this:
<script SRC="http://www.url.to/my/banner/exchange/bannex.cgi?username"></script>
The query string is their username. $num is a random number. That way they can put the same code on every page instead of having to change the number for every page. Please help me! This is urgent!! My banner exchange is at a stand-still right now!
Thanks!
--Edge
Edge posted this at 22:05 — 10th July 2000.
They have: 117 posts
Joined: Mar 2000
Nevermind, I fixed it!
I needed to put print "Content-type: text/html\n\n"; in there.
I wonder why it always worked without that before... Oh well. I'll leave this up here in case anyone wants the script to rotate their own banner/link exchange banners.
--Edge
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.