$next_protocol = 'ICMP';
     $next_target_asn_array['ICMP'] = false;
 } else {
     if ($next_target_asn_array['UDP']) {
         $next_protocol = 'UDP';
         $next_target_asn_array['UDP'] = false;
     } else {
         $next_protocol = 'TCP';
         $next_target_asn_array['TCP'] = false;
     }
 }
 // add remaining array back to list of scheduled measurements
 $scheduled[$next_target_asn] = $next_target_asn_array;
 // setup new measurement
 $description = 'Traceroute Measurement (' . $next_protocol . ') from ASN' . $next_target_asn . ' for campaign ' . $campaign_id;
 $example = new TracerouteMeasurement($target, $description, $next_protocol, $next_target_asn);
 $answer = $example->start($campaign_id);
 // check answer
 if ($answer == 'not covered') {
     // delete from list of scheduled measurements (all protocols)
     unset($scheduled[$target_asn]);
     // add to list of networks not covered
     $not_covered[] = $target_asn;
 } else {
     if ($answer == 'too many') {
         sleep(1);
     } else {
         if ($answer == 'other error') {
             // add to error list
             $error[] = $current_asn;
         } else {
<?php

require 'MeasurementCampaign.php';
require 'TracerouteMeasurement.php';
require 'ASListHandler.php';
$example = new MeasurementCampaign(333, "Test", "Test");
echo 'Number of measurements for campaign ' . $example->id . ': ' . $example->get_number_of_measurements() . '<br/>';
$measurements_of_campaign = $example->get_measurement_ids();
foreach ($measurements_of_campaign as $measurement_id) {
    echo TracerouteMeasurement::get_status_by_id($measurement_id) . '<br />';
}
<?php

require 'TracerouteMeasurement.php';
#if(empty($_POST['target'])) {
$target = $_POST['target'];
$description = $_POST['description'];
$protocol = $_POST['protocol'];
$target_asn = $_POST['target_asn'];
$example = new TracerouteMeasurement($target, $description, $protocol, $target_asn);
$example->add();
echo '\\nStatus: ';
echo $example->get_status();
$example->write_to_db();
# Timeout des PHP-Skripts vermeiden
#ini_set("max_execution_time", "somevalueinsecs");
ini_set("max_execution_time", 2000);
/*
$test1 = TracerouteMeasurement::get_status_by_id(3102248);
$test2 = TracerouteMeasurement::get_measurement_data_by_id(3102248);
print_r($test1);
echo '<br/><br/>';
print_r($test2);
*/
$msm_id1 = 3102248;
$msm_id2 = 3103931;
$test3 = TracerouteMeasurement::get_result_data_by_id($msm_id2);
echo '<pre>';
print_r($test3);
echo '</pre>';
echo '<br/><br/>';
$test4 = TracerouteMeasurement::download_single_result_measurement_data_by_id($msm_id2);
echo '<pre>';
print_r($test4);
echo '</pre>';
echo '<br/><br/>';
/*
$campaign_id = 14;
$myCampaign = new MeasurementCampaign($campaign_id, 'Test', 'Test');
$measurement_id_list = $myCampaign->get_measurement_ids();
echo '<br/>';
echo 'Number of measurements for campaign ' . $campaign_id . ': ' . $myCampaign->get_number_of_measurements();
echo '<br/>';

foreach ($measurement_id_list as $measurement_id) {
	TracerouteMeasurement::download_start_stop_time_by_id($measurement_id);
}
<?php

include_once 'TracerouteMeasurement.php';
include_once 'GeolocationDBHandler.php';
include_once 'Analysis.php';
ini_set("max_execution_time", 20000);
/*
$test = GeolocationDBHandler::get_geolocation_data_ip2location();
GeolocationDBHandler::write_geolocation_data_to_db($test, 'ip2location');
*/
/*
$test = GeolocationDBHandler::get_geolocation_data_software77();
GeolocationDBHandler::write_geolocation_data_to_db($test, 'software77');
*/
/*
$test = GeolocationDBHandler::get_geolocation_data_maxmind();
GeolocationDBHandler::write_geolocation_data_to_db($test, 'maxmind');
*/
/*
$ip_address = '192.76.243.2';
$ip_address2 = '125.253.112.0';
$test = Analysis::get_country_of_ip_address($ip_address, 'ip2location');
echo $test;
*/
$ids = array(3103840, 3103841, 3103842, 3103843, 3103844, 3103845, 3103846, 3103847, 3103848, 3103854, 3103856, 3103857, 3103858, 3103859, 3103860, 3103861, 3103862, 3103863, 3103870, 3103871, 3103872, 3103873, 3103874, 3103875, 3103876, 3103877, 3103878, 3103930, 3103931, 3103932, 3103933, 3103934, 3103935, 3103936, 3103937, 3103938, 3103943, 3103944, 3103945, 3103946, 3103947, 3103948, 3103949, 3103950, 3103951, 3103967, 3103968, 3103969, 3103970, 3103971, 3103972, 3103973, 3103974, 3103975, 3103981, 3103982, 3103983, 3103984, 3103985, 3103986, 3103987, 3103988, 3103989);
foreach ($ids as $current_id) {
    TracerouteMeasurement::download_single_result_measurement_data_by_id($current_id);
}