Decimal encode/decode

Started on the old forum in February 2011 · view the original in the archive · old links redirect here

#code #decimal #decrypt #encrypt #php

No replies · 1,599 views · started 15 years ago · 1 min read

just_m3. Developer · 199 posts #1

Encode and decode text by decimal 😊

Demo: http://xmob.eu/decimal.php

Snippet :

<?php
$string=$_POST['text'];
$stringdecript=$_POST['textdecript'];

$print="<textarea cols=\"15\" rows=\"1\" readonly=\"readonly\"  onfocus=\"this.select()\">".$string."</textarea>";
echo"Before:<br>".$print." <br>";

echo'Encrypt your text:<br><form action="decimal.php" method="post"><textarea cols="10" name="text" rows="1" style="width:300px;height:100px;" value="" id="code_txt"  onfocus="this.select()">';
unick($string);
echo'</textarea><br><input type="submit" value="Encrypt"></form>';

$stringdec=str_replace('&','&',$stringdecript);
$print="<textarea cols=\"15\" rows=\"1\" readonly=\"readonly\"  onfocus=\"this.select()\">".$stringdec."</textarea>";
echo"Before:<br>".$print." <br>";
echo'Decrypt your text:<br><form action="decimal.php" method="post"><textarea cols="10" name="textdecript" rows="1" style="width:300px;height:100px;" value="" id="code_txt"  onfocus="this.select()">';
echo"$stringdecript";
echo'</textarea><br><input type="submit" value="Decrypt"></form>';

function unick($string){ 
for($i=0;$i<strlen($string);$i++) { 
 echo "&#".ord($string{$i}).";"; }
}
?>

This is ten percent luck, twenty percent skill Fifteen percent concentrated power of will Five percent pleasure, fifty percent pain 😂And a hundred percent reason to remember the name!

Attachments: decimal.zip

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close