Can you tell me why this script error...
when I try this script i read some message
| Code: |
| <?php
# ip deny class # author S.V.Sudharshan. 01/04/2001 # improved from Simple IP Deny v 3.0 (previous by Robbo) # see revision notes below for changes. # ***REVISION 4.01*** # This code was revised by mikkoeerola@hotmail.com 08/27/2001 # Revision Changes: # 1. If denyList is empty, ip check will be skipped # 2. Fixed errortime reporting, earlier version displayed hours and minutes # with only 1 digit, eg. 2:3 (14:03). Got rid of unnecessary errortime code # and used date() function instead. class IP_Deny { var $classname = "IP_Deny"; var $denyList = ""; var $notify = 1; var $respond = 1; var $denyMsg = "Server fail"; var $emailaddress = getenv("SERVER_ADMIN"); var $remote_ip = getenv("REMOTE_ADDR"); var $docroot = getenv("SERVER_NAME"); var $denied = 0; function send_email(){ # Request access to the global variables we need global $REQUEST_URI; # Build the $errortime variable to contain the date/time of the error. $errortime = date("D M j Y G:i:s T"); # Create email subject and propaganda =) for the notify email $email_subject = "Access attempt from $this->remote_ip"; # Create the body of the email message $message = "IP $this->remote_ip tried to access $this->docroot$REQUEST_URI on your server on $errortime.\n\n"; # Send the mail message. This assumes mail() will work on your system! mail("$this->emailaddress", $email_subject, $message, "From: $this->emailaddress"); return; } # send_email function end. function probe(){ # if the denied IP == remote IP if ($this->denyList != "") { if(ereg("^($this->denyList)",$this->remote_ip)){ $this->denied = 1; if ($this->notify == 1 ) $this->send_email(); if ($this->respond == 1) { echo ' <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <!-- Error --> <font name="Arial">'; echo $this->denyMsg; echo '</font> </body> </html>'; } } } } # probe function end. } # class definition end. ?> |
when I try this script i read some message
| Quote: |
| Parse error: parse error, unexpected '(', expecting ',' or ';' in c:\xampp\htdocs\test.php on line 21 |
