Contacts got easier to manage on Gmail

Today when I opened my Gmail Inbox, there was a slight change in the feel with some changes in navigation. It seems navigation has been changed for ease of use. Some changes have been made to Contacts also. With new features in Contacts, labeling like for mails has also been added. This will make quick … Read more

Print Alphabets (PHP)

How to Print Alphabets. You can print a range of Alphabets e.g. from A to Z or A to ZZ like A, B, C … AA, AB, AZ… ZY, ZZ and more $length=”3″; for ($alpha=’A’; strlen($alpha)<=$length; $alpha++) { print “$alpha<br>”; }

.CO – to Go for it or Not

.CO TLD was opened for general registrations just after the day when the most popular TLD .COM turned 25 years old. Within few minutes of its opening more than 1,00,000 domains were grabbed and currently more than 3,25,000 domains have already been registered..WoW! what a great start for .CO. Many people are still thinking that … Read more

The .CO Era!

.CO TLD was opened today (20th July, 2010) for General Registrations at around 11:30PM (IST). More than 100000 domains were grabbed in First 25 minutes. If you were not able to grab a .com domain of your choice, now you have a chance to have a similar TLD – .CO.CO stands for – “Company”, “Corporation” … Read more

Page Generation Time (using PHP)

With this script you can display how much this Time this page has taken to load. <?php // Insert at the start of your document $time = round(microtime(), 3); // Insert at the end of your document $time2 = round(microtime(), 3); $generation = $time2 – $time; echo “This page took $generation seconds to render”; ?>

Fetching data from a Page (data between Tags) using PHP

You can fetch data from a webpage by using this script. It is useful when you need to fetch data like Stock Rates on your site. Like if you want to fetch data between span tags. <?php // retrieve htmltagcontent tag contents function get_htmltagcontent($file){ $h1tags = preg_match_all(‘/(<span>)(.*)(</span>)/ismU’,$file,$patterns); $res = array(); array_push($res,$patterns[2]); array_push($res,count($patterns[2])); return $res; } … Read more

Get Title of a Webpage using PHP – 3

<?php function getTitle($url) { $fh = fopen($url, “r”); $str = fread($fh, 5000); fclose($fh); $str2 = strtolower($str); $start = strpos($str2, “<title>”)+7; $len   = strpos($str2, “</title>”) – $start; return substr($str, $start, $len); } ?>

Get Title of a Webpage using PHP – 2

<?php $url=”http://example.com”; echo getTitle($url); function get_page_title($url) { if( !($data = file_get_contents($url)) ) return false; if( preg_match(“#<title>(.+)</title>#iU”, $data, $t))  { return trim($t[1]); } else { return false; } } ?>