$string = 'http://www.google.com';
$bir = explode('.',$string);
echo $bir[1]; //google