diff --git a/webfrontend/pgm3/CHANGED b/webfrontend/pgm3/CHANGED
index edd66e1fb..675676679 100644
--- a/webfrontend/pgm3/CHANGED
+++ b/webfrontend/pgm3/CHANGED
@@ -213,3 +213,8 @@ It is not necessary to tell fhem that there are other logs.
2012-04-25
-- Feature: debugging for xmllist included
+2012-05-02
+ -- Bugfix: getting xmllist from FHEM without \r\n, no netcat any more
+ Changed: index.php, config.php
+
+
diff --git a/webfrontend/pgm3/HISTORY b/webfrontend/pgm3/HISTORY
index f8b8f659f..430cfd7f9 100644
--- a/webfrontend/pgm3/HISTORY
+++ b/webfrontend/pgm3/HISTORY
@@ -116,3 +116,6 @@
- Martin 2012-04-25
-- Feature: debugging for xmllist included
+
+- Martin 2012-05-03
+ -- Bugfix: getting xmllist from FHEM without \r\n
diff --git a/webfrontend/pgm3/config.php b/webfrontend/pgm3/config.php
index ea0f0963b..30a19cdb1 100644
--- a/webfrontend/pgm3/config.php
+++ b/webfrontend/pgm3/config.php
@@ -360,9 +360,6 @@ $userdef[$sortnumber]['logrotatelines']=30;
$winsize=800; # width of the pgm3
-##### use netcat if your have problems with the stream_socket-tcp-connection
-## package netcat must be installed
- $usenetcat=0;
##########################
##### SKINS - change your colors
diff --git a/webfrontend/pgm3/index.php b/webfrontend/pgm3/index.php
index bc595aed3..47cfe8581 100644
--- a/webfrontend/pgm3/index.php
+++ b/webfrontend/pgm3/index.php
@@ -6,7 +6,7 @@
#
# Copyright notice
#
-# (c) 2006-2010 Copyright: Martin Haas (fhz@martin-haas.de)
+# (c) 2006-2012 Copyright: Martin Haas (fhz@martin-haas.de)
# All rights reserved
#
# This script is free software; you can redistribute it and/or modify
@@ -41,7 +41,7 @@ include "include/gnuplot.php";
include "include/functions.php";
-$pgm3version='120425';
+$pgm3version='120503';
@@ -226,35 +226,31 @@ if (! isset($showroom)) $showroom="ALL";
if (($taillog==1) and (isset ($showhist)) ) exec($taillogorder,$tailoutput);
+
+
+
#executes over the network to the fhem.pl (or localhost)
function execFHZ($order,$machine,$port)
{
global $errormessage;
-if ($usenetcat=='1')
- {
- $order="$echo xmllist | netcat -w3 $machine $port";
- exec($order,$res);
- $errormessage = $res[0];
- }
- else
- {
$fp = stream_socket_client("tcp://$machine:$port", $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)
\n";
} else {
- fwrite($fp, "$order\n;quit\n");
+ fwrite($fp, "$order;quit\n");
$errormessage= fgets($fp);
fclose($fp);
}
- }
-#}
+
return $errormessage;
}
+
+
###### make an array from the xmllist
unset($output);
$stack = array();
@@ -264,24 +260,23 @@ unset($longxml);
$version = explode('.', phpversion());
-
+################################################################################
# get the xmllist from fhem
$fp = stream_socket_client("tcp://$fhem:$fhemport", $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)
\n";
} else {
- fwrite($fp, "xmllist\r\n;quit\r\n");
+ fwrite($fp, "xmllist;quit\n");
$outputvar=stream_get_contents($fp);
array_push($output,$outputvar);
fclose($fp);
+
}
-
-
# start_element_handler ( resource parser, string name, array attribs )
function startElement($parser, $name, $attribs)
{
@@ -636,7 +631,8 @@ xml_parser_free($xml_parser);
- ############################ FHZ
+
+ ############################ FHZ
if ($show_fs20pulldown==1 or $show_general==1 or $show_fhtpulldown==1)
{
echo "