Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?
function encode($text) {
$shift=5;
//$text слово для зашифровки $shift насколько символов смещать
$codeText = "";
for($i=0; $i<strlen($text); $i++) {
$symbol=ord($text[$i])+$shift;
//находим ASCII код символа
if($symbol>255) {
$symbol=$symbol-255;
}
$codeText=$codeText.chr($symbol);
//записываем закодированный вариант
}
echo $codeText;
}
encode("BFKKQJX");
?>