If a visitor ISP has a hostname like this xxxx.xx.xx.de or yyy.yy.se, how do I easily cut the first part away and keep the top level domain (.de or just de)?
Thanks from a newbie, Michael
The manual is full of info. Read it.
substr() can grab strings starting at a position. strrpos() can find the last posistion of a character in a string.
$hostname="www.bla.com"; echo substr($hostname,strrpos($hostname,".")+1);