Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $text = $_GET['text'];
- $hashValue = (int)$_GET['hashValue'];
- $fontSize = $_GET['fontSize'];
- $fontStyle = $_GET['fontStyle'];
- $result = "style=\"font-size:{$fontSize};";
- if ($fontStyle == 'bold') {
- $result .= 'font-weight:bold;">';
- } else {
- $result .= "font-style:{$fontStyle};\">";
- }
- function encryptInputText($text, $hashValue) {
- $encrypted = '';
- for ($i = 0; $i < strlen($text); $i++) {
- $asciiValue = ord($text[$i]);
- if (($i % 2) == 0) {
- $encrypted .= chr($asciiValue + $hashValue);
- } else {
- $encrypted .= chr($asciiValue - $hashValue);
- }
- }
- return $encrypted;
- }
- $result .= encryptInputText($text, $hashValue);
- echo "<p {$result}</p>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement