after getting the host by gethostbyaddr("xx.xx.xx.xx") i get the host name. How do i return only the last 2 things.
example this.is.a.test returns a.test
example blah.1.2.3.blah returns 3.blah
i tried using
$isp = explode(".",$host)
Then doing
$isp[2].".".$isp[3]
but not all of the hostnames have the same ammount of .'s in them. Please help
Thanks
example this.is.a.test returns a.test
example blah.1.2.3.blah returns 3.blah
i tried using
$isp = explode(".",$host)
Then doing
$isp[2].".".$isp[3]
but not all of the hostnames have the same ammount of .'s in them. Please help
Thanks
Comment