TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 10-12-2009, 05:11 AM   #1 (permalink)
That guy
 
cachepl0x's Avatar
 
Join Date: Sep 2009
Location: San Antonio, TX
Posts: 24
Thanks: 0
cachepl0x is on a distinguished road
Default 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"); 
cachepl0x is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the point? Or so I thought...... Hightower The Lounge 5 06-25-2009 12:12 PM
Project Thought? Randy TalkPHP Developer Team 5 06-20-2009 07:33 AM
Another thought.. Tanax Advanced PHP Programming 3 11-17-2008 06:47 PM
A cute mysql function :) SpYkE112 Script Giveaway 2 06-03-2008 05:27 AM
Passing through, thought I'd say hi! Colleen Member Introductions 1 07-06-2007 02:40 PM


All times are GMT. The time now is 07:21 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design