Gossamer Forum
Home : General : Perl Programming :

Good programmers PLEASE HELP???

Quote Reply
Good programmers PLEASE HELP???
I have a banner script which I got running fine, BUT I need to change the banner size, and it checks for banner size.

I have attempted to change every instance of 468x60 to 217x60 in every script.

But, it still won't let me upload any banners unless they are 468x60

Here is the file I think is responsible for the banner size check.

Please let me know if you can translate this and help me with it?

#gET dATA
binmode STDIN;
read (STDIN,$buf,$ENV{CONTENT_LENGTH});
($day,$month,$date,$time,$year)=split(" ",scalar localtime);
$pdate="$month $date $year";

#pARSE dATA
($boundary)=$ENV{CONTENT_TYPE}=~/boundary="([^"]+)"/; #";
($boundary)=$ENV{CONTENT_TYPE}=~/boundary=(\S+)/ unless $boundary;
$boundary="--".$boundary;
@file=split("\r\n$boundary",$buf);
foreach (@file)
{
s/\r\n\r\n/delimeter/;
}
($field,$name)=split("delimeter",$file[0]);
($field,$file)=split("delimeter",$file[1]);
$word=chr(0x47).chr(0x49).chr(0x46).chr(0x38).chr(0x39).chr(0x61).chr(0x15).chr(0x00).chr(0x3C).chr(0x00);
$nextword=chr(0x47).chr(0x49).chr(0x46).chr(0x38).chr(0x37).chr(0x61).chr(0x15).chr(0x00).chr(0x3C).chr(0x00);
if ($file=~/^$word/ | | $file=~/^$nextword/)
{
open (F,">$adcpath/banners/$name.gif");
binmode F;
print F $file;
close (F);
open (FL, ">$adcpath/bases/$name/banner");
print FL $pdate;
close(FL);
open (FL, ">$adcpath/bases/$name/impressionsb");
close(FL);
open (FL, ">$adcpath/bases/$name/clicksb");
close(FL);
open (FL, "<$adcpath/template/sucupl.tpl");
@htmlpage=<FL>;
close (FL);
$htmlpage=join("\n",@htmlpage);
print "HTTP/1.0 200 Found\n" if ($sysid eq "Windows");
print "content-type: text/html\n\n";
eval $htmlpage;
exit;
}
push (@errors, "Your banner must be a GIF with size 468x60");
open (FL, "<$adcpath/template/errupl.tpl");
@htmlpage=<FL>;
close (FL);
$htmlpage=join("\n",@htmlpage);
print "HTTP/1.0 200 Found\n" if ($sysid eq "Windows");
print "content-type: text/html\n\n";
eval $htmlpage;
exit;

------------------
Website Solution
http://www.websitesolution.net
Quote Reply
Re: Good programmers PLEASE HELP??? In reply to
Sol,
I dont think you gave us the right peice of code. the only part that could possibly chaeck for sizes is:

Code:
$word=chr(0x47).chr(0x49).chr(0x46).chr(0x38).chr(0x39).chr(0x61).chr(0x15).chr(0x00).chr(0x3C).chr(0x00);
$nextword=chr(0x47).chr(0x49).chr(0x46).chr(0x38).chr(0x37).chr(0x61).chr(0x15).chr(0x00).chr(0x3C).chr(0x00);

I still dont think that does it. Could it be in any other parts of the script?

------------------
Sincerely,

Netoo! Support
Netoo! Internet Services Of America.
http://www.netoo.phiberoptix.com
Quote Reply
Re: Good programmers PLEASE HELP??? In reply to
Well, the last time I talked with the programmer (long time ago, hard to get a hold of him) he sent me 4 files replace old ones.

I did so, but still nothing...