10-12-2009, 06:11 AM
|
#1 (permalink)
|
|
That guy
Join Date: Sep 2009
Location: San Antonio, TX
Posts: 24
Thanks: 0
|
I thought this was cute
My friend proposed to his now fiance with this script, and I thought it was cute. He first showed her the output, she was excited, but thought it was lack-luster. Then, he showed her the source, and since their are both PHP developers, she thought it was incredibly sweet.
It's really simple, but I guess it did it's job, lol.
PHP Code:
class Hash { public $word, $arr, $val;
public function strtohash($word) { $val = md5(sha1($word)); if (isset($val)) { $arr = array( "9" => "I LOVE YOU, ", "bdb" => "please be my ", "3f3b" => "wife! ", "0df77fc" => "I will treat you right, ", "f3f334" => "so please, ", "5eb53" => "say yes.", "6b1e2f" => " <3" ); } return strtr($val, $arr); } }
$h = new Hash(); echo $h->strtohash("THIS IS A STRING");
|
|
|
|