X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab%2Fnodes%2Fcomon.php;h=743ee02ed9355999cecb517d49aebb4bfbf04133;hb=a22283104e3671eaddb8823b7d1f585a0721b888;hp=3524eb9520d465501d18ee91e4868f145bb746df;hpb=388ae6f6d06c4ef578194547ef33e934b3fc5fba;p=plewww.git diff --git a/planetlab/nodes/comon.php b/planetlab/nodes/comon.php index 3524eb9..743ee02 100644 --- a/planetlab/nodes/comon.php +++ b/planetlab/nodes/comon.php @@ -14,7 +14,7 @@ require_once 'plc_functions.php'; // http://summer.cs.princeton.edu/ // "138.96.250.12" function plc_ip_to_int ($ip) { - $bytes=array_map("intval",split("[.]",$ip)); + $bytes=array_map("intval",explode(".",$ip)); $res=0; foreach (range(0,3) as $i) { $res=256*$res+$bytes[$i]; @@ -93,8 +93,6 @@ foreach ($nns as $nn) { $local_ips[] = $nn['ip']; } -//plc_debug('locals',$local_ips); - // for foreign hosts we're left with dns resolving them $remote_ips=array(); foreach ($hostnames as $hostname) { @@ -106,17 +104,13 @@ foreach ($hostnames as $hostname) { } } -//plc_debug('remote ips',$remote_ips); - - // add both lists $all_ips=$local_ips+$remote_ips; // compute comon URL $url = plc_comon_url_from_ips("http://comon.cs.princeton.edu",$all_ips); -//plc_debug('url',$url); // redirect to comon -header("Location: " . $url); +plc_redirect($url); ?>