Hello All happy new year
I am trying to make a php page that detects if something is plugged in to the ethernet port.
This would be complex if not impossible. I however managed to do something similar the device
that will be plugged in has a static address 192.168.1.1. so I created a ping that says if the device is up or
down.
function ping($host, $port, $timeout)
{
$fP = fSockOpen($host, $port, $errno, $errstr, $timeout);
$status;
if ($fP)
{ echo "Device is ready to accept data";}
else
{ echo "Device Down - Retrying connection"; }
}
What I would like to do is have a script that is constantly checking is the device is plugged or when it is not
(so sort of a loop or auto detect). The idea is to have an image with the device up or down.
Regards
and a happy new year
JG