<?php
echo <<<A
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>UTF-8 &lt;===&gt; Unicode Convertor</title>
<meta name="keywords" content="UTF-8 to Unicode Convertor, Unicode to UTF-8 Convertor, HTML to Entities Value, String to Unicode, UTF-8 6 bit Support" />
<meta name="description" content="UTF-8 to Unicode Convertor, Unicode to UTF-8 Convertor, HTML to Entities Value, String to Un?>
This script designed to secure your pages. session is used for security check with new checkbox technology!. It have configuration variables helps you to specialize it with your needs.
<?php
//....
/********************************************************************************
    Configuration
    **************************************************************************/
    
$key1 'admin';
    
$key2 'dailyreport';
    
$admin_email 'akam@localhost.com';

    
$salt 'qwsdfvbnm,!@#$%^&*(ZXCVBNM<]][poi\=-0987634rtghbnWDFVBNM7410963-+-*/';
    
    
$checkboxes1 = array(=> 'YES',     //YES or NO
                            
=> 'NO',     //YES: means that the checkbox should be selected during login
                            
=> 'NO',    //NO: means that the checkbox should not be selected during login
                            
=> 'NO',    //for example: if in there the 4 => 'NO'  menas that in the login page the
                                            //4th checkbox should not be selected. measured from right to left 
                            
=> 'NO',    //NOTE: The checkbox measured from right to left in the login page!
                            
=> 'NO',
                            
=> 'NO',
                            
=> 'NO',
                            
=> 'YES'
                            
);

    
    
$login_time 600;         //300 seconds (i.e 5 minutes), you can type 5*60!
                                //0 disable
    
    
$timeout_time 120;      //after 2 minutes of inactivity, session will be expire!
                                //0 disable
    
    
    
$notify_admin 'NO';        //after 3 invlid login, admin will be notified by email
                                //'NO' disable
                                
    
$invalid_login 3;         //
    
    
$hour_diff "-1";     //adjust it by + or - Number! (diffrent between your local and server time)
    
    
$login_log 'YES';    //Log admin: log ip, date, ...! 
                                //'NO' disable
    
    
$logfile_dir '';        //path to dir! (linux: /home/www/user/logdir/....) (Win: d:\\www\\username\\logdir\\)    
    
$logfile_name $logfile_dir.'a1q23opkio78952109kdAHA78aHASFshjka.txt';
//...
?>
Many Times Globality of variables will be the small issue, after long time I decided to use super globals. Super globals exists any where: $_SERVER, $_GET, $_POST ..... Now for example:
<?php
$foo
[] = range(03);
$_POST['foo'] = $foo;
a(); //no parameters needed.
b();
$foo $_POST['foo'];

Print_r($foo);
/* out

Array
(
    [0] => Array
        (
            [0] => 0
            [1] => 1
            [2] => 2
            [3] => 3
        )

    [1] => Array
        (
            [0] => 4
            [1] => 5
            [2] => 6
            [3] => 7
       ?>
<?php                   
$converted    
=
array(
//3 of special chars

'/(;)/ie',
'/(#)/ie',
'/(&)/ie',

//MySQL reserved words!
//Check mysql website!
'/(ACTION)/ie''/(ADD)/ie''/(ALL)/ie''/(ALTER)/ie''/(ANALYZE)/ie''/(AND)/ie''/(AS)/ie''/(ASC)/ie',

//remaining of special chars
'/(<)/ie''/(>)/ie''/(\.)/ie''/(,)/ie''/(\?)/ie''/(`)/ie''/(!)/ie''/(@)/ie''/(\$)/ie''/(%)/ie''/(\^)/ie''/(\*)/ie''/(\()/ie''/(\))/ie''/(_)/ie''/(-)/ie''/(\+)/ie',
'/(=)/ie''/(\/)/ie''/(\|)/ie''/(\\\)/ie'"/(')/ie"'/(")/ie''/(:)/'
);

$input_text ?>
<?php
// Author akam at akameng dot com
// Support 6 bit
function UTF_to_Unicode($input$array=False) {

 
$bit1  pow(640);
 
$bit2  pow(641);
 
$bit3  pow(642);
 
$bit4  pow(643);
 
$bit5  pow(644);
 
$bit6  pow(645);
 
 
$value '';
 
$val   = array();
 
 for(
$i=0$istrlen$input ); $i++){
 
     
$ints ord $input[$i] );
    
     
$z     ord $input[$i] );
     
$y     ord $input[$i+1] ) - 128;
     
$x     ord $input[$i+2] ) - 128;
     
$w     ord $input[$i+3] ) - 128;
     
$v     ord $input[$i+4] ) - 128;
     
$u     ord (?>
<?php
$to      
$_POST['to'];
$email   $_POST['email'];
$name    $_POST['name'];
$subject $_POST['subject'];
$comment $_POST['message'];

$To          strip_tags($to);
$TextMessage =strip_tags(nl2br($comment),"<br>");
$HTMLMessage =nl2br($comment);
$FromName    =strip_tags($name);
$FromEmail   =strip_tags($email);
$Subject     =strip_tags($subject);?>

PHP Manual

User login