D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home3
/
encodto1
/
aviscollection.com
/
Filename :
function.php
back
Copy
<?php function encryptor($action, $string) { $output = false; $encrypt_method = "AES-256-CBC"; $secret_key = 'Kp Encoders'; $secret_iv = 'kp@123456789'; $key = hash('sha256', $secret_key); $iv = substr(hash('sha256', $secret_iv), 0, 16); if( $action == 'encrypt' ) { $output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv); $output = base64_encode($output); } else if( $action == 'decrypt' ) { $output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv); } return $output; } function redirect($link){ echo "<script>window.location.href='<?php echo $link ?>'</script>"; } function pr($arr){ echo '<pre>'; print_r($arr); // die(); } function get_safeStr($str){ global $conn; $data = stripcslashes($str); $str = mysqli_real_escape_string($conn, $data); return $str; } ?>