
prsnlty
Deleted
Mar 20, 2000, 5:43 AM
Post #3 of 5
(277 views)
|
|
Re: Premeture end of script headers...
[In reply to]
|
Can't Post
|
|
I don't believe I have telnet access, just ftp. If it's the same thing I don't understand how to use it. This is the script that is receiving the error below and thank you :-) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #!/usr/bin/perl #################################################################################################### # BANANA BANNER CLICKTHROUGH SYSTEM Version 1.0 # Copyright 1999 Bananascripts, Inc. webmaster@bananascripts.com # Created 10/10/99 Last Modified 10/20/99 #################################################################################################### # Selling the code for this program without prior written consent is # expressly forbidden. # # Love your monkeys http://www.bananascripts.com/ Bananascripts, Inc. # # Obtain written permission before redistributing this software over the Internet or # in any other medium. In all cases copyright and header must remain intact. ##################################################################################################### require "configure.cgi"; &configure; #################################################################################################### $host = "$ENV{'REMOTE_HOST'}"; $refer = "$ENV{'HTTP_REFERER'}"; print "Content-Type: text/html\n"; print "Set-Cookie: $agentcode=nukedaccount; path=/; expires=Mon, 01-Jan-2001 00:00:00 GMT\n"; &getperiod; &checkuniques; if ($affiliate ne "nukedaccount"){ &logclick; } ################################################################### sub checkuniques { $cookie="$ENV{'HTTP_COOKIE'}"; ($trash,$affiliate) = split(/$agentcode=/,$cookie); if ($affiliate=~ /;/){ ($affiliate,$trash) = split(/;/,$affiliate); } } ################################################################### sub logclick { open (DATABASE, "$memberdatabase"); @database=<DATABASE>; close DATABASE; foreach $database (@database) { chomp $database; ($name,$company,$sitename,$url,$email,$address,$city,$state,$zip,$country,$ssnumber,$username,$password,$recruiter) = split(/\|/,$database); if ($affiliate eq $username){ last; } } open (FILE, ">>$cgidirectory/logs/$affiliate.$period.db"); flock(FILE, 2); chomp $date; print FILE "$shortdate|$host|$refer|$affiliate|$primarycommission\n"; flock(FILE, 8); close (FILE); open (FILE, ">>$cgidirectory/logs/$period.log"); flock(FILE, 2); chomp $date; print FILE "$shortdate|$host|$refer|$affiliate|$primarycommission\n"; flock(FILE, 8); close (FILE); } ############################################################ # SUBROUTINES ############################################################ sub form_parse { read (STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; }} ############################################################ # GET PERIOD ############################################################ sub getperiod { require "ctime.pl"; chop($date = &ctime(time)); ($weekday,$month,$day,$time,$zone,$year)=split(/ /,$date); if ($day eq ""){ $day = $time; } $shortdate = "$month $day"; open (SCHEDULESEEDS, "$cgidirectory/data/schedule.db"); @schedules=<SCHEDULESEEDS>; foreach $schedules (@schedules){ ($searchperiod,$getpaydays)=split(/\|/,$schedules); (@searchpaydays)=split(/\,/,$getpaydays); foreach $searchpaydays(@searchpaydays){ chomp $searchpaydays; if ($shortdate eq $searchpaydays){ $currentperiod = $searchperiod; @currentpaydays = @searchpaydays; } } } $period = $FORM{'period'}; if ($period eq ""){ @paydays = @currentpaydays; $period = $currentperiod; $startdate = $paydays[0]; $periodlength = @paydays; $periodcue = $periodlength - 1; $stopdate = $paydays[$periodcue]; } else { foreach $schedules (@schedules){ ($searchperiod,$getpaydays)=split(/\|/,$schedules); (@searchpaydays)=split(/\,/,$getpaydays); if ($period eq $searchperiod){ @paydays = @searchpaydays; } } $startdate = $paydays[0]; $periodlength = @paydays; $periodcue = $periodlength - 1; $stopdate = $paydays[$periodcue]; } $lastperiod = $period - 1; $nextperiod = $period + 1; } 1; # Return true
|