Script to determine connected time of IP