Remote Rig
RRC 1258 Support in English => General discussion forum => Topic started by: HB9ODP on 2010-06-11, 12:59:56
-
Hello, it's possible to read a string with an internal http page to know if the relais are ON or OFF?
-
Hi, you can use PHP and parse html pages. I'm using this way to read Analog input for rotator position and calibration.
// file rotator.php
$kalibrace=-10; //calibration
$dom = new domDocument;
loadHTMLFile('http://10.20.0.202/adin.egi');
$tables=$dom->getElementsByTagName('table');
$rows = $tables->item(0)->getElementsByTagName('tr');
$i=0;
foreach ($rows as $row)
{
if($i==4){
$cols = $row->getElementsByTagName('td');
$poloha=$cols->item(1)->nodeValue;
}
$i++;
}
echo $poloha+$kalibrace; // print antenna position
This way you can get any info from webswitch.
73 Ondra OK1CDJ