Actually my problem is ridiculous. I provide security by adding header. When I add the encrypted data, the browser gives an error.
Code source output :
headers: {
"Authorization": "���6���/��O��u�f�߁v2��",
},
Browser detects:
headers: {
"Authorization": "���6���/��O��
u�f�߁v2��",
},
PHP Code :
headers: {
"Authorization": "<?php echo $_SESSION['sID']; ?>",
},
My Session Class :
class Session {
public function __construct() {
if(session_status() == PHP_SESSION_NONE) {
session_start();
}
self::Encrypt('sID', session_id());
}
public static function Encrypt($Name, $Value) {
if(!is_null($Value)) {
$_SESSION[$Name] = openssl_encrypt($Value, Config::Get('Encrypt/Type'), Config::Get('Encrypt/Password'), OPENSSL_RAW_DATA, Config::Get('Encrypt/Session'));
return $_SESSION[$Encrypt];
}
return false;
}
}
What is the problem? Does anyone have an idea ? Best regards !
Also : str_replace
and trim
tried its functions.