AbraCadaver, Thanks for the feedback. The reason I'm using sockets is the above statement generates this error that I have not been able to resolve.
"Warning: simplexml_load_file(http://192.168.2.106/xmldata) [function.simplexml-load-file]: failed to open stream: HTTP request failed! <?xml version="1.0" encoding="ISO-8859-1"?> in C:\xampp\htdocs\xmltest2.php on line 2" I think it is related to the way this device implements http.
bh, Thank you for your feedback. I've reviewed and tried many samples / tutorials and applied to this xml with no luck.
For example the following xpath code does not yield the <value> for probe 1:
<?php
// Establish a port 80 connection
$http = fsockopen("192.168.2.106",80);
// Send a request to the server
$req = "GET /xmldata HTTP/1.0\r\n";
$req .= "Host: 192.168.2.106\r\n";
$req .= "Connection: Close\r\n\r\n";
fputs($http, $req);
// Output the request results
while(!feof($http)) {
$xmlstr .= fgets($http, 2048);
}
// Close the connection
fclose($http);
$xml = simplexml_load_string($xmlstr);
$myValue = $xml->xpath('//Group[@ID="9"]/Probe[@ID="1"]/value');
echo $myValue[0];