$template_include = file_get_contents('template/default/main_header.tpl');
$template = str_replace("{title}", "Загловок", $template_include);
$template = str_replace("{price}", "100 рублей", $template);
...
или так
$template = str_replace(['{title}','{price}'], ['Заголовок','100 рублей'], $template_include);
echo $template;
function sendFile($file, $server) {
$request = curl_init($server);
$tempFile = $_SERVER['DOCUMENT_ROOT'] . '/temp/' . $file['name'][0];
move_uploaded_file($file['tmp_name'][0], $tempFile);
$mime = mime_content_type($tempFile);
$data = array('files' => '@' . $tempFile. ';type=' . $mime);
curl_setopt($request, CURLOPT_POST, 1);
curl_setopt($request, CURLOPT_POSTFIELDS, $data);
curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
$res = curl_exec($request);
curl_close($request);
return $res;
}
sendFile($_FILES['files'], $server);