Tag archives: image

Get the favicon of a website | PHP Script Snippet

Here's a little feature that allows you to easily retrieve the favicon of a URL


<?php
/**
 * Get favicon from a URL.
 * 
 * @param string $sUrl
 * @return string The favicon image.
 */
function get_favicon($sUrl)
{
	$sApiUrl = 'http://www.google.com/s2/favicons?domain=';
	$sDomainName = get_domain($sUrl);
	
	return $sApiUrl . $sDomainName;
}

/**
 * Get domain name from a URL (helper function).
 * 
 * @param string $sUrl
 * @return string $sUrl Returns the URL to lower case and without the www. if present in the URL.
 */
function get_domain($sUrl)
{
        $sUrl = str_ireplace('www.', '', $sUrl);
        $sHost = parse_url($sUrl, PHP_URL_HOST);
        return $sHost;
}
?>

How to use this


<a href="http://www.php.net/manual ...

Continue reading

Have a attractive and original cover photo | Facebook Timeline

Have a attractive and original cover photo | Facebook Timeline

Difficult to find a nice cover photo for your Facebook Timeline (Facebook profile).
So here are two links that can help you to get the picture that makes me want to visit your profile.

  1. FB Profile Covers (Often also called the name "Best FB Cover")
  2. Name Covers
  3. Cover Photoz
  4. FB Covers King

I also advise you to always keep a theme for your cover photos, for example, have a theme "humor", "horror", "music", "star", "holidays", ...).
Also keep in mind that your cover photos are always public, so anyone can view them.

Gook luck on your FB Timeline! ;)

Continue reading