[insert_php]

$widget_id = „GK3M8W“; //add your widgetid here
$add_to_config = array(); // furter configuration

if ($widget_id == „“){
die(„No widget selected. Please specifiy the id of your prefered widget in this PHP file! You can find it in the ID column in your SKYCHECK Partners Account. If you don’t have a widget yet, you can create one. Just login and visit https://partner.skycheck.com/widgets“);
}

[/insert_php]

[insert_php]
// all available search vars
$sc_available_api = array(„airport_from_iata“,“airport_from_city“,“airport_from_country“,“airport_to_iata“,“airport_to_city“,“airport_to_country“,“search_data_departure_date“,“search_data_return_date“,“search_data_departure_time“,“search_data_return_time“,“search_data_oneway“,“search_data_flexible_date“,“search_data_nonstop“,“search_data_adults“,“search_data_childs“,“search_data_infants“, „submit_searchform“);

$sc_requested_conf_arr = array();

// get all requested search data
foreach($sc_available_api as $config_var){
$config_stack = $_REQUEST[$config_var] == NULL ? false : $_REQUEST[$config_var];
if($config_stack !== false){
$sc_requested_conf_arr[$config_var] = $config_stack;
}
}

// further configuration (not send via form)
foreach($add_to_config as $key => $value){
$sc_available_api[] = $key;
$sc_requested_conf_arr[$key] = $value;
}

// all fields set?
if(count($sc_requested_conf_arr) > 0 ){
$config_params = implode(array_map(create_function(‚$key, $value‘, ‚return „\'“.$key.“\‘:\'“.$value.“\'“;‘), array_keys($sc_requested_conf_arr), array_values($sc_requested_conf_arr)),“,“);
$config_params = sprintf(„?config=[%s]“, $config_params);
}else{
$config_params = false;
}
[/insert_php]