| 
	
		| View previous topic :: View next topic |  
		| Author | Message |  
		| Soccerguy12 -
 
 
 Joined: 04 Nov 2003
 Posts: 2
 
 
 | 
			
				|  Posted: Sun Nov 09, 2003 6:16 pm    Post subject: My script |   |  
				| 
 |  
				| I really dont know perl at all and I have no way of testing my script. COuld someone possibly tell me if this would work: 
 #!/usr/bin/perl
 
 
 
 if ($ENV{'REQUEST_METHOD'} eq 'POST') {
 
 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;
 }
 
 
 $usr = $FORM{'usr'};
 $txt = $FORM{'txt'};
 $pword = $FORM{'pword'};
 $date
 if($usr eq "Mike" && $pword eq "mike")
 {
 if(unlink("Mike.html");)
 {
 unlink("Mike.html");
 link("Mike.html");
 }
 else{link("Mike.html");}
 open(PAGE,|"Mike.html")
 print PAGE "$date;"
 print PAGE "$txt;"
 close (PAGE);
 
 }
 |  |  
		| Back to top |     |  
		|  |  
		| aprelium -
 
 
 Joined: 22 Mar 2002
 Posts: 6800
 
 
 | 
			
				|  Posted: Thu Nov 13, 2003 3:23 am    Post subject: Re: My script |   |  
				| 
 |  
				| Soccerguy12, 
 This script seems to be fine. If you execute it on Abyss, you'll get error 200. This means that the script sent no output to the server which is the case. To avoid this message, add at the end these line:
 
 
  	  | Code: |  	  | print "Status: 200 OK\n\nInformation recorded"; | 
 _________________
 Support Team
 Aprelium - http://www.aprelium.com
 |  |  
		| Back to top |       |  
		|  |  
		|  |  
  
	| 
 
 | You cannot post new topics in this forum You cannot reply to topics in this forum
 You cannot edit your posts in this forum
 You cannot delete your posts in this forum
 You cannot vote in polls in this forum
 
 |  |