{*
 Шаблон вычисления "Выполнить http-запрос"
*}

// обрабатываем строку запроса
$url = '{$url}';
foreach ($table_fields as $one_field) {
    $url = str_replace('{ldelim}' . $one_field['name_field'] . '{rdelim}', urlencode(form_display_type($one_field, $line, 'text')), $url);
    if (strpos($url, '{ldelim}' . $one_field['name_field'] . '.')) {
        $link_line = is_array($line[$one_field['int_name']]) ? $line[$one_field['int_name']] : data_select_array($one_field['s_table_id'], 'id = ', $line[$one_field['int_name']]);
        $link_table_fields = get_table_fields(get_table($one_field['s_table_id']));
        foreach ($link_table_fields as $link_field) {
            $url = str_replace('{ldelim}' . $one_field['name_field'] . '.' . $link_field['name_field'] . '{rdelim}', urlencode(form_display_type($link_field, $link_line, 'text')), $url);
        }
    }
}

// отправляем запрос
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
if ($config['proxy_host']) {
    curl_setopt($ch, CURLOPT_PROXY, $config['proxy_host'] . ($config['proxy_port'] ? ':' . $config['proxy_port'] : ''));
}
if ($config['proxy_user']) {
    curl_setopt($ch, CURLOPT_PROXYUSERPWD, $config['proxy_user'] . ':' . $config['proxy_pass']);
}
curl_exec($ch);