im looking for a php function to split a domain name

lets say i have this:

http://www.wallpaperama.com

and i want to only get the wallpaperama part from it

how do i do this?