Re: PHP Love Letter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin Alterisio wrote:
Been quiet too much...

*This time, I seriously advise against running this piece of code unless you
know what you're doing*

Enjoy...

-------

<html>
<head>
 <title>Love Letter</title>
</head>
<body>
<?php
 if (in_array($me, $her->acquaintances)) {
?>
 <p>Dear <?=$her->name?>,</p>
 <p>I really enjoy your company and I would love to meet you again.</p>
 <p>I had a lot of fun last time and I can't wait to get to know you
better.</p>
 <p>Yours sincerely, <?=$me->name?></p>
<?php
 } else if (in_array($me, $her->intimateFriends)) {
?>
 <p>Dear <?=$her->nickName?>,</p>
 <p>All I wanted to say is how lucky I'm to have met you, to have you by my
side.</p>
 <p>I can't think of a world without you. I can't possibly thank you enough
for all the happy moments you gave me.</p>
 <p>Yours, <?=$me->nickName</p>
<?php
 } else if (isset($her->boyfriend) && $her->boyfriend == $me) {
   $loversNicknames = array('Honey', 'Sweetie', 'Baby', 'Princess',
'Queen', 'Love', 'Sunshine');
?>
 <p>My <?=$loversNicknames[array_rand($loversNicknames)]?>,</p>
 <p>I couldn't wait to tell you how much I love you.</p>
 <p>You're the only one, the reason why I'm on this world. The only place I
wanna be is besides you.</p>
 <p>Missing you already, your Love</p>
<?php
 } else if (isset($her->husband) && $her->husband== $me) {
?>
 <p>I love you.</p>
 <p>PS: What's for dinner?</p>
<?php
 } else {
   // You don't need the love letter, you need a girl
   exec('mv '.__FILE__.' > /dev/null');
   // Now, get your lazy ass out there
   exit;
 }
?>
</body>
</html>

Finally get to the heart of the matter with the PS... LOL

Nice work - but if I ever found out my husband used a program that ran on cron to send me a love letter - I would be both impressed (that he coded it since he doesn't code) and by the 3rd one waiting for flowers as well.

--

life is a game... so have fun.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux