1stwebdesigner

Posted by | Posted on 19:40

1stwebdesigner


15 Interesting, Funny, and Strange Websites

Posted: 23 Nov 2010 01:00 PM PST

Searching for these strange, funny, and interesting websites is really fun. I spent hours using all of the search engines in the known universe and I chose these among the many because they’re unique.

I know that many of you guys are stressed or bored (or stressed and bored), that’s why you should check the following and let your mind be blown away!

Are you ready?

FUNNY

1.Zombo.com

Mystery_zombocom

This one I found at Reddit.com over a year ago. There’s a little charm in this website that made me share it with people I know and before I know it they’re all imitating what Zombocom is repeatedly saying. What is Zombocom? Click and know! I provided the script below in hopes that, one day, I’ll be hearing you say it too. *laugns*

I don’t know how to take a better screenshot for this because the site only has a banner and several circles, inches apart. Not quite a good use of white space.

The booming voice, like an evil genie, repeatedly says: “This is zombocom, and welcome to you who have come to zombocom! Anything is possible at zombocom. You can do anything at zombocom. The infinite is possible at zombocom. The unattainable is unknown at zombocom. Welcome to zombocom, this is zombocom!”

2.Gay Test

Gaytest


Do not lie to yourself and take this test only ONCE! Taking it twice suggests that you doubt yourself, ha!  Some things are not suitable for children like the following words…you actually thought I’m posting them here? *laughs* (Yes, I love laughing)

3.www.nooooooooooooooo.com

Noooooooooooooo


Upon learning that Padme is dead, Darth Vader ended the Star Wars Episode III: Revenge of the Sith with a heartbreaking, anti-climatic “Nooooooooo!”
Well, this website will be of much use someday when you learn something very troubling…like being permanently banned from Google Ads. “Press in dire situations”

4.Is it Tuesday?

Isittuesday

Are you not sure if it is Tuesday? Visit this site to be certain, it bears the truth!

5.Snap Bubbles


Bubblewrap


It is said that bubble wraps can calm even the most angered soul in hell. You’d be lying if you say that you’ve never, ever, snapped a single bubble! Although the feel and sound of this is not like the real one, at least there’s an alternative to it during bubble wrap scarcity right?

6.Crush Checker

Whoisyourcrush


Deceive your friends to know the person of their dreams! Shame it worked on me once. *laughs*

INTERESTING

7.TackFilm

Tackfilm

Surprise your friends with a worldwide sensation: You! Just upload your photo and wait until it is processed then send it to your friends and see their reactions! Although I don’t understand the language (I think it’s one of Switzerland’s languages) you won’t get lost because there are only two options to choose from at a given time. The photo I uploaded is a real sensation in his country. *laughs*

8.The Mobile Tracker

Gps_track


Enter a mobile phone number and let The Mobile Tracker do the job. Very surprising technology!

9.We Are Autobots

Weareautobots

Bumblebee is in trouble, who’s he gonna call? Not ghost busters but you! Help him using your webcam.

10.ie6funeral.com

RipIE

Oh the good and the bad memories when IE6 was still walking with us compiled in this website to express users’ and developers’ sorrow and delight.

One must not speak ill of the dead so I’ll say “Nice try!”

11.Virtual Piano

Virtualpiano

Into piano but you don’t own one yet?  Easy, with Virtual Piano all you need is a computer with an internet connection and you’re good to go. Who knows, a Bach might be inside of you all along.

12.Cleverbot

Cleverbot

This chat AI really knows how to respond to things most of the time, it gets too clever it creeps me out of my skin!

STRANGE

13.Neon Bible

Mystery_neon_bible

This one’s purpose is already known but it is still very strange. The guy in the photo, Win Butler, is singing Neon Bible. Not only that the song is sort of creepy, you can actually interact with him by clicking the hands and eyes (creepy effect, I’d say!). This can be inspiring in terms of how you can do promotions. I find this one very creative.

14.Hell.com

Mystery_hell

This is the first mysterious website I’ve seen, and from there on I started searching the internet for answers on what is inside. I stumbled upon a discussion board where a poster mentioned that he, allegedly, actually paid $100 for the chance of getting access and several months later the poster received an e-mail with a unique link to a section of the website. The e-mail said that they will give no answer to what Hell.com is about, that there may be no answer at all.

According to other people Hell.com is a place where artists meet. But let’s end the speculation here and I’ll shed some light, at least in an interview which can be read here: Click!

Over time the flash at Hell.com changes, before this maze-like logo there was an ominous vampire-like eyes. You can use the WayWayBack Machine to see the changes over the past several months.

15.Heaven.com

If there is Hell.com there’s also Heaven.com. There is a question in the homepage asking “Where is Heaven?” and it bears the promise to notify subscribers when Heaven comes to Earth. The screenshot below is taken after I subscribed. One question remains about the answer is, where’s the farthest reaches of the North?

Mystery_heaven

I guess there’s only one way to find out, so I subscribed. Further research about Heaven.com only led to spiritual websites about Heaven.

I wish you had fun with all (or at least some) of the websites I featured. It’s your turn to share!

PHP for Beginners: Part 3 – Email with PHP

Posted: 23 Nov 2010 02:00 AM PST

Today We are continuing our PHP series. One of the major uses of a server side scripting language is to provide a way of sending e-mail from the server and, in particular, to take form input and output it to an e-mail address. In this part I will show you how to send e-mail messages using PHP.

PHP mail() function

E-mails in PHP can be easily sent using the library function ‘mail’. This function takes four arguments to send E-mails from a PHP web page and returns ‘true’ upon successful delivery of Email. The parameters of this function are as follows:

  • Recipient E-mail address
  • E-mail Subject
  • E-mail message (body)
  • Headers and additional parameters

Syntax:

 mail( string to, string subject, string message [, string additional_headers [, string additional_parameters]] ); 

The section $headers is used for any additional e-mail headers you may want to add. The most common use of this is for the From field of an e-mail ( Sender E-mail address ) but you can also include other headers like cc and bcc.

This function returns the boolean value ‘True’ if the mail is sent successfully, otherwise it returns ‘False’.

Sending An E-mail

Before sending your mail, if you are using variables, you must, of course, set up the variable content beforehand. Here is some simple code for sending a message:

 $to = "demo@example.com"; $subject = "PHP Rock"; $body = "PHP is one of the best scripting languages around"; $headers = "From: phpcoder@example1st.com\n"; mail($to,$subject,$body,$headers); echo "Mail successfully sent to $to"; 

This code will actually do two things. Firstly it will send a message to demo@example.com with the subject ‘PHP Rock’ and the text:
PHP is one of the best scripting languages around
and the e-mail will be from phpcoder@example1st.com. It will also output the text:
Mail successfully sent to demo@example.com
to the browser.

Formatting E-mail

Something you may have noticed from the example is that the From line ended with \n. This is actually a very important character when sending e-mail. It is the new line character and tells PHP to take a new line in an e-mail. It is very important that this is put in after each header you add so that your e-mail will follow the international standards and will be delivered.

The \n code can also be used in the body section of the e-mail to put line breaks in but should not be used in the subject or the To field.

PHP Validate Email

PHP validate email script is an easy way to validate an email address. Use this quick and simple PHP regular expression for email validation. This is also case-insensitive, so it will treat all characters as lower case. It is a really easy way to check the syntax and format of an email address. Function will return TRUE if address is valid and FALSE if not.

 function isValidEmail($email){ return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email); } 

Mail Without Variables

The e-mail above could have been sent using different variable names (it is the position of the variables in relation to the commas, not the name of them which decides on their use). It could also have been done on one line using text like this:

 mail("demo@example.com","PHP Rock","PHP is one of the best scripting languages around","From: phpcoder@example1st.com\n"); 

But that would make your code slightly harder to read.

Error Control

As anyone who has been scripting for a while will know, it is extremely easy to make mistakes in your code and it is also very easy to input an invalid e-mail address (especially if you are using your script for form to mail). Because of this, you can add in a small piece of code which will check if the e-mail is sent:

 if(mail($to,$subject,$body,$headers)) { echo "An e-mail was sent to $to with the subject: $subject"; } else { echo "There was a problem sending the mail. Check your code and make sure that the e-mail address $to is valid"; } 

This code is quite self explanatory. If the mail is sent successfully it will output a message to the browser telling the user, if not, it will display an error message with some suggestions for correcting the problem.

BONUS: Sending Email Using the Zend Framework

In addition to my previous Zend Framework tutorials, in this section i will introduce you another cool feature of that amazing framework, working with emails.

The Zend Framework’s Zend_Mail component, when coupled with the Zend Framework’s approach to minimizing redundancy and maximizing portability, offers the ideal solution for configuring and transmitting email through PHP-driven webpages. In this section, we will be using the Zend_Mail component.

First, within the application’s config.ini file, I define various parameters used to configure the transmission solution:

 ; email  email.smtpserver = smtp.gmail.com email.username   = demo@example.com email.password   = strong_password email.support    = support@example.com 

Within the bootstrap.php file, I configure Zend_Mail’s transport mechanism, drawing upon the parameters defined in config.ini:

 $mailConfigs = array('auth' => 'login', 'username' => $config->email->username, 'password' => $config->email->password, 'ssl' => 'tls');  $tr = new Zend_Mail_Transport_Smtp($config->email->smtpserver, $mailConfigs); Zend_Mail::setDefaultTransport($tr); 

Although this executes with each request, the overhead required to do so is minimal and will not affect performance. Finally, I invoke code similar to the following from within the appropriate controllers:

 try { // Create a new mail object $mail = new Zend_Mail();  $mail->setFrom($this->config->email->from_admin); $mail->addTo("user@example.com"); $mail->setSubject("Your account has been created");  $email = "Thank you for registering!";  $mail->setBodyText($email); $mail->send();  $this->view->success = 1; } catch (Exception $e) { $this->view->errors[] = "We were unable to send your confirmation email. Please contact {$this->config->email->support}."; } 

If you’d like to add an attachment, all you need to do is invoke the $mail object’s createAttachment() method:

 $mail->createAttachment("file.pdf"); 

If you want to send HTML-formatted email, just use the setBodyHtml() method instead of setBodyText():

 $mail->sendBodyHTML("Thank <b>you</b> for registering!"); 

Additional Resources

Sending email from your PHP-powered websites is easy once you’ve been provided with the necessary background, so hopefully this tutorial helped alleviate any initial confusion you had in this regard. For further information, check out the following resources for more information about sending email using PHP:

What’s Next?

In part 4 I will continue covering mail by showing you how to build a simple form to mail program in PHP. And will tell you some final notes :) So, see you in next part.

Comments (0)

Post a Comment