sorry didnt mean to be jibbing your code, i didnt even notice it was credited to you at the time. And as it appears $longip has odd behavours anyway, so i wasnt so "right" as it stands.