Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php session_start(); ob_start("ob_gzhandler"); set_time_limit(0);
- $website="http://zwiazek.bialelugi.pl"; //Make this full url including folders of where login files resides
- //sanitize data where any character is allowed
- function sanitizer($check){
- $check=str_replace("\'","'",$check);
- $check=str_replace('\"','"',$check);
- $check=str_replace("\\","TN9OO***:::::t&*HHHHOOOoooo0000N",$check); //just to keep track of what I will change later
- $check=trim($check);
- $check=str_replace("<","<",$check);
- $check=str_replace('>','>',$check);
- $check=str_replace("\r\n","<br/>",$check);
- $check=str_replace("\n","<br/>",$check);
- $check=str_replace("\r","<br/>",$check);
- $check=str_replace("'","'",$check);
- $check=str_replace('"','"',$check);
- $check=str_replace("TN9OO***:::::t&*HHHHOOOoooo0000N","\",$check); //returning backslash in html entity
- return $check;}
- //makes data ok on edit textarea
- function resanitize($check){
- $check=str_replace("<br/>","\r\n",$check);
- $check=str_replace("<br/>","\n",$check);
- $check=str_replace("<br/>","\r",$check);
- $check=str_replace(">",">",$check);
- $check=str_replace("<","<",$check);
- $check=str_replace("'","'",$check);
- $check=str_replace('"','"',$check);
- return $check;}
- //validate email address
- function validate_email($email){
- $status=false;
- $regex='/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,5})$/';
- if(preg_match($regex, $email)){$status=true;}
- return $status; }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment