the php script which updates the IP of the devices

When the device connects to this, its ipaddress is registered and a random device ID is generated.