Interesting Internet and Technology facts

We are living on Information age with cutting edge technologies. Internet and all those amazing technological advancements had lead us to the new way of living. Internet and those technology has become an integral part of our lives. Some how I believe in near future Internet and technology will be listed as basic needs.

If you are reading this, then you must be an Internet and technology admirer. Being an admirer I believe you should be aware of these amazing facts.

  1. Tim Berners-Lee coined the phrase “World Wide Web” in 1990.
  2. While it took the radio 38 years, and the television a short 13 years, it took the World Wide Web only 4 years to reach 50 million users.
  3. Did you know that Email was already around before the World Wide Web came?
  4. About 1.8 billion people connect to the Internet, only 450 million of them speak English.
  5. The average 21 year old has spent 5,000 hours playing video games, has exchanged 250,000 e-mails, instant and text messages and has spent 10,000 hours on the mobile phone.
  6. Up until the 14th of September, 1995, domain registration was free.
  7. Every month, domain names are being registered at a rate of more than two million!
  8. Symbolics.com is the first and oldest registered domain name. It completed 28 years on 15th March, 2013.
  9. Mosaic was the first popular web browser which was released in 1993.
  10. Amazon, originally was a printed book seller company, now it sells more e-books than printed books.
  11. The Domain name www.youtube.com was registered on Feburary 14, 2005.
  12. Every minute, 10 hours of videos are uploaded on YouTube.
  13. Facebook reports over 1 billion registered users. Were it a country, it would have had 3rd largest population in the World.
  14. The average computer user blinks 7 times a minute, less than half the normal rate of 20.
  15. Google uses an estimated 15 billion kWh of electricity per year, more than most countries. However, Google generates a lot of their own power with their solar panels.
  16. Did you know how was Bill Gates’s house was designed? Using a Macintosh computer.
  17. 220 million tons of old computers and other technological hardware are trashed in the United States each year.
  18. Doug Engelbart had made the first computer mouse in 1964, and it was made out of wood.
  19. On an average work day, a typist’s fingers travel 12.6 miles.

How To Limit Search Results For Specific Post Types in WordPress

I was working on a site where I need to limit the search to post types only. Wondering for a while I figured out how to limit search results for specific post types in WordPress. To do so you have to add a function on your functions.php.

The above code limits the search to post only. But you can change it according to your needs. To do so you have to make changes on line:

To add pages to search along with post:

You can add values to array like above to limit search results.

Email address validation using PHP

Most people use regular expression (regex) for email validation. But there is no simple regex for validating email. The expression with the best score is, regex by Michael Rushton.

PHP’s filter_var(), is based on the above regex. If you are using PHP 5 or later then you can use this handy function for validating an email.

Below is the syntax for email validation