//for($i=1;$i<=$totFilters;$i++) foreach ($_POST as $constraint) { $dataArray[] = $constraint; } //echo 'parameters sent: <br/>'; //print_r($dataArray); //echo '</pre>'; //$data='[{"constraint1":"does","constraint2":"originate","constraint3":"city","constraint4":"Halifax","constraint5":"AND"},{"constraint1":"does","constraint2":"goesVia","constraint3":"city","constraint4":"Toronto","constraint5":"AND"},{"constraint1":"does","constraint2":"terminate","constraint3":"city","constraint4":"Chicago","constraint5":""}]'; // two //$data='[{"constraint1":"does","constraint2":"originate","constraint3":"city","constraint4":"Toronto","constraint5":"AND"},{"constraint1":"does","constraint2":"goesVia","constraint3":"city","constraint4":"Miami","constraint5":"AND"}]'; $data = json_encode($dataArray); // one //$data='[{"constraint1":"does","constraint2":"originate","constraint3":"city","constraint4":"Toronto","constraint5":"AND"}]'; Traceroute::saveSearch($data); //Traceroute::testArrays(); $b = Traceroute::getTraceRoute($data); /* if(count($b)>1000) { echo '<p>The number of traceroutes found is greather than 1000. <br/>Please add new constraints to your query.</p>'; } else { Traceroute::renderTrSets($b); }*/ Traceroute::renderTrSets($b); //Traceroute::buildWhere($data); //$trId = 1813; //echo 'TR id: '.$trId.' : Last Hop: '.Traceroute::getLastHop($trId); //Traceroute::getHop($trId, 'last'); } // testing /* $c = array_diff($a, $b);
//for($i=1;$i<=$totFilters;$i++) /** */ foreach ($_POST as $constraint) { $dataArray[] = $constraint; } //echo 'parameters sent: <br/>'; //print_r($dataArray); //echo '</pre>'; if ($dataArray[0]['constraint1'] == "quickLink") { /*echo '<textarea>'; print_r($dataArray); echo '</textarea>';*/ $b = Traceroute::processQuickLink($dataArray); } else { $b = Traceroute::getTraceRoute($dataArray); } $data = json_encode($dataArray); $saveLog = Traceroute::saveSearch($data); //Traceroute::saveSearch($data); // get IXmaps geographic data and prepare the response into a json format //print_r($data); if (count($b) != 0) { $ixMapsData = Traceroute::getIxMapsData($b); //print_r($ixMapsData); $ixMapsDataT = Traceroute::dataTransform($ixMapsData); //print_r($ixMapsDataT); $ixMapsDataStats = Traceroute::generateDataForGoogleMaps($ixMapsDataT); $trHtmlTable = Traceroute::renderTrSets($ixMapsDataT); } // end calculation of execution time