Commit 05fcf043 authored by Dominik's avatar Dominik

Support gziped (and uncompressed) node.data

parent 19a3e1a6
......@@ -72,9 +72,9 @@
//fetch crawl data from router
$return = array();
if($ip->getNetwork()->getIpv()==6)
$command = "curl -s --max-time $crawl_timeout -g http://[".$ip->getIp()."%25\$(cat /sys/class/net/$network_connection_ipv6_interface/ifindex)]/node.data";
$command = "curl -s --max-time $crawl_timeout -g http://[".$ip->getIp()."%25\$(cat /sys/class/net/$network_connection_ipv6_interface/ifindex)]/node.data | zcat -f";
elseif($ip->getNetwork()->getIpv()==4)
$command = "curl -s --max-time $crawl_timeout -g http://".$ip->getIp()."/node.data";
$command = "curl -s --max-time $crawl_timeout -g http://".$ip->getIp()."/node.data | zcat -f";
echo " ".$command."\n";
exec($command, $return);
$return_string = "";
......
......@@ -7,9 +7,9 @@
if($ip->fetch()) {
$return = array();
if($ip->getNetwork()->getIpv()==6)
$command = "curl -s --max-time 10 -g http://[".$ip->getIp()."%25\$(cat /sys/class/net/".ConfigLine::configByName("network_connection_ipv6_interface")."/ifindex)]/node.data";
$command = "curl -s --max-time 10 -g http://[".$ip->getIp()."%25\$(cat /sys/class/net/".ConfigLine::configByName("network_connection_ipv6_interface")."/ifindex)]/node.data | zcat -f";
elseif($ip->getNetwork()->getIpv()==4)
$command = "curl -s --max-time 10 -g http://".$ip->getIp()."/node.data";
$command = "curl -s --max-time 10 -g http://".$ip->getIp()."/node.data | zcat -f";
exec($command, $return);
$return_string = "";
foreach($return as $string) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment