oh, i have this neat php function you can use to remove the extention from a tld domain name.

for example, lets say i have a hostname as : wallpaperama.com

but i only want the wallaperama part and not the dot com part so this function will remove the extesion from the domain name:

hope this helps

function remove_ext($filename) {
	$extension = strrchr($filename, '.');
	if($extension !== false){
		$filename = substr($filename, 0, -strlen($extension));
	return $filename;