Перенаправление php. Как перенаправить пользователя на другую страницу? Использование функции PHP header() для редиректа URL-адреса

(PHP 4, PHP 5, PHP 7)

header — Send a raw HTTP header

Description

header (string $header [, bool $replace = TRUE [, int $http_response_code ]]) : void

header() is used to send a raw HTTP header. See the » HTTP/1.1 specification for more information on HTTP headers.

Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include , or require , functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP/HTML file.


/* This will give an error. Note the output
* above, which is before the header() call */
header ();
exit;
?>

Parameters

The header string.

There are two special-case header calls. The first is a header that starts with the string "HTTP/ " (case is not significant), which will be used to figure out the HTTP status code to send. For example, if you have configured Apache to use a PHP script to handle requests for missing files (using the ErrorDocument directive), you may want to make sure that your script generates the proper status code.

header ("HTTP/1.0 404 Not Found" );
?>

The second special case is the "Location:" header. Not only does it send this header back to the browser, but it also returns a REDIRECT (302) status code to the browser unless the 201 or a 3xx status code has already been set.

header ("Location: http://www.example.com/" ); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */
exit;
?>

Replace

The optional replace parameter indicates whether the header should replace a previous similar header, or add a second header of the same type. By default it will replace, but if you pass in FALSE as the second argument you can force multiple headers of the same type. For example:

header ("WWW-Authenticate: Negotiate" );
header ("WWW-Authenticate: NTLM" , false );
?>

Http_response_code

Forces the HTTP response code to the specified value. Note that this parameter only has an effect if the header is not empty.

Return Values

No value is returned.

Changelog

Version Description
5.1.2 This function now prevents more than one header to be sent at once as a protection against header injection attacks.

Examples

Example #1 Download dialog

If you want the user to be prompted to save the data you are sending, such as a generated PDF file, you can use the » Content-Disposition header to supply a recommended filename and force the browser to display the save dialog.

// We"ll be outputting a PDF
header ("Content-Type: application/pdf" );

// It will be called downloaded.pdf
header ("Content-Disposition: attachment; filename="downloaded.pdf"" );

// The PDF source is in original.pdf
readfile ("original.pdf" );
?>

Example #2 Caching directives

PHP scripts often generate dynamic content that must not be cached by the client browser or any proxy caches between the server and the client browser. Many proxies and clients can be forced to disable caching with:

header ("Cache-Control: no-cache, must-revalidate" ); // HTTP/1.1
header ("Expires: Sat, 26 Jul 1997 05:00:00 GMT" ); // Date in the past
?>

You may find that your pages aren"t cached even if you don"t output all of the headers above. There are a number of options that users may be able to set for their browser that change its default caching behavior. By sending the headers above, you should override any settings that may otherwise cause the output of your script to be cached.

«An obsolete version of the HTTP 1.1 specifications (IETF RFC 2616) required a complete absolute URI for redirection. The IETF HTTP working group found that the most popular web browsers tolerate the passing of a relative URL and, consequently, the updated HTTP 1.1 specifications (IETF RFC 7231) relaxed the original constraint, allowing the use of relative URLs in Location headers.»

Workaround: do not send those headers.

Also, be aware that IE versions 5, 6, 7, and 8 double-compress already-compressed files and do not reverse the process correctly, so ZIP files and similar are corrupted on download.

Workaround: disable compression (beyond text/html) for these particular versions of IE, e.g., using Apache"s "BrowserMatch" directive. The following example disables compression in all versions of IE:

BrowserMatch ".*MSIE.*" gzip-only-text/html

4. Relative URIs are NOT allowed

wrong: Location: /something.php?a=1
wrong: Location: ?a=1

It will make proxy server and http clients happier.

15 years ago

If you haven"t used, HTTP Response 204 can be very convenient. 204 tells the server to immediately termiante this request. This is helpful if you want a javascript (or similar) client-side function to execute a server-side function without refreshing or changing the current webpage. Great for updating database, setting global variables, etc.

Header("status: 204"); (or the other call)
header("HTTP/1.0 204 No Response");

15 years ago

A call to session_write_close() before the statement

header ("Location: URL" );
exit();
?>
is recommended if you want to be sure the session is updated before proceeding to the redirection.

We encountered a situation where the script accessed by the redirection wasn"t loading the session correctly because the precedent script hadn"t the time to update it (we used a database handler).

9 months ago

// Beware that adding a space between the keyword "Location" and the colon causes an Internal Sever Error

//This line causes the error
7
header("Location: index.php&controller=produit&action=index");

// While It must be written without the space
header("Location: index.php&controller=produit&action=index");

1 year ago

The header call can be misleading to novice php users.
when "header call" is stated, it refers the the top leftmost position of the file and not the "header()" function itself.
"

10 years ago

Here is a php script I wrote to stream a file and crypt it with a xor operation on the bytes and with a key:

The encryption works very good but the speed is decrease by 2, it is now 520KiB/s. The user is now asked for a md5 password (instead of keeping it in the code directly). There is some part in French because it"s my native language so modify it as you want.

// Stream files and encrypt the data on-the-fly

// Settings
// -- File to stream
$file = "FILE_out" ;
// -- Reading buffer
$bufferlength = 3840 ;
// -- Key in hex
//$keychar = "9cdfb439c7876e703e307864c9167a15";

// Function: Convertion hex key in a string into binary
function hex2bin ($h ) {
if (! is_string ($h )) return null ;
$r = array();
for ($a = 0 ; ($a * 2 )< strlen ($h ); $a ++) {
$ta = hexdec ($h [ 2 * $a ]);
$tb = hexdec ($h [(2 * $a + 1 )]);
$r [ $a ] = (int) (($ta << 4 ) + $tb );
}
return $r ;
}

// Function to send the auth headers
function askPassword ($text = "Enter the password" ) {
header ("WWW-Authenticate: Basic realm="" . utf8_decode ($text ) . """ );
header ("HTTP/1.0 401 Unauthorized" );
return 1 ;
}

// Key is asked at the first start
if (!isset($_SERVER [ "PHP_AUTH_PW" ])) {
askPassword ();
echo "Une clé est nécessaire !
"
;
exit;
}
// Get the key in hex
$keychar = $_SERVER [ "PHP_AUTH_PW" ];

// Convert key and set the size of the key
$key = hex2bin ($keychar );
$keylength = count ($key );
// Teste si la clé est valide en hex
if ($key == "" || $keylength <= 4 ) {
askPassword ("Clé incorrecte !" );
//echo "Clé incorrecte !
";
exit();
}
// Teste si la clé est de longueur d"une puissance de 2
if (($keylength % 2 ) != 0 ) {
askPassword ("Clé de longueur incorrecte (multiple de 2 uniquement)" );
//echo "Clé de longueur incorrecte (puissance de 2 uniquement)
";
exit();
}

// Headers
header ("Content-Type: application/octet-stream; " );
header ("Content-Transfer-Encoding: binary" );
header ("Content-Length: " . filesize ($file ) . "; " );
header ("filename=\"" . $file . "\"; " );
flush (); // this doesn"t really matter.

// Opening the file in read-only
$fp = fopen ($file , "r" );
while (! feof ($fp ))
{
// Read a buffer size of the file
$buffer = fread ($fp , $bufferlength );
$j = 0 ;
for ($i = 0 ; $i < $bufferlength ; $i ++) {
// The key is read in loop to crypt the whole file
if ($i % $keylength == 0 ) {
$j = 0 ;
}
// Apply a xor operation between the key and the file to crypt
// This operation eats a lots of CPU time (Stream at 1MiB/s on my server; Intel E2180)
$tmp = pack ("C" , $key [ $j ]);
$bufferE = ($buffer [ $i ]^ $tmp ); // <==== Le fameux XOR

/*
echo "
key[".$j."]: ";
var_dump($tmp);
echo "
buffer[".$i."]: ";
var_dump($buffer[$i]);
echo "
bufferE: ";
var_dump($bufferE);
echo "
";
//*/

// Send the encrypted data
echo $bufferE ;
// Clean the memory
$bufferE = "" ;
$j ++;
}
$buffer = "" ;
flush (); // this is essential for large downloads
/*
fclose($fp);
exit();
//*/
}
// Close the file and it"s finished
fclose ($fp );

Быстрая навигация по этой странице:

Если вы решили написать скрипт и сделать редирект PHP, преимущества этого шага очевидны: PHP – серверно ориентированный язык скриптов; перенаправление будет выполняться посредством скрипта на сервере, а не в браузере посетителей. Некоторые перенаправления могут быть выполнены на стороне клиента — через редирект js (то есть через JavaScript редирект).

Это более гибкий и универсальный подход, и вы можете выполнить несколько типов редиректа в PHP, в отличие от других методов. Вот — наиболее частые виды редиректа, которые можно сделать в PHP: a) 301 редирект PHP (статус постоянного перенаправления), b) 302 редирект PHP (временный статус переадресации), с) Обновление.

Эта статья будет полезна, в первую очередь, для начинающих веб-мастеров, которые ищут способы реализации перенаправления URL, если это не возможно с использованием других распространенных решений, таких как Htaccess.

Заголовок языка PHP функции

Например, предположим, вы хотите сделать редирект к этому URL http://www.somewebsite.com/target.php. В исходном PHP страницы, Вам просто следует вызвать этот скрипт редиректа:

Попробуйте также провести этот простой эксперимент на вашем локальном хостинге:

1) Откройте текстовый редактор и введите этот код:

Сохраните его как targetpage.php.

2) Откройте другой пустой текстовый файл и введите этот код:

Сохраните его как originatingpage.php.

3) Теперь запустите веб-браузер. В адресной строке браузера введите: http://localhost/originatingpage.php

4) Вы заметите, что после нажатия кнопки ввода, этот URL: http://localhost/originatingpage.php делает редирект на http://localhost/targetpage.php и на targetpage.php, и вы видите слова «Hi this is codex-x».

Одна из самых распространенных ошибок может крыться в оформлении кода html редиректа:

Попробуйте выполнить этот эксперимент:

Перейдите к скрипту originatingpage.php и добавьте любой HTML тег:

header(‘Location: http://localhost/targetpage.php’);

Предположим, у вас есть такой код:

Это – ошибка редиректа </ TITLE> </ HEAD> <body> <? PHP header("Location: http://localhost/targetpage.php"); > </ BODY> </ HTML> </p><p>2) Сохраните файл.</p> <p>3) Запустите снова скрипт originating.php в . Если вы не видите любые ошибки, вы заметите, что она по-прежнему чисто перенаправляет к targetpage.php</p> <p>4) Теперь попробуйте изменить целевой URL, чтобы указать на реальный сайт, например:</p><p> <html> <head> <title> пример ошибки редиректа</ TITLE> </ HEAD> <body> <? PHP header("Location: http://localhost/targetpage.php"); > </ BODY> </ HTML> </p><p>5) Загрузите originatingpage.php на удаленный хостинг в корневой каталог сайта.</p> <p>6) Выполните скрипт в браузере с помощью вызова originatingpage.php URL, например: http://www.php-developer.org/originatingpage.php</p> <p>7) Вы заметите, что на этот раз, вы столкнетесь с ошибкой:</p><p>Warning: Cannot modify header information - headers already sent by (output started at /home/phpdevel/public_html/originatingpage.php:6) in /home/phpdevel/public_html/originatingpage.php on line 7 </p><p>Что здесь происходит? Причиной проблемы является то, что у вас уже выведен код HTML перед заголовком функции.</p> <h2>В чем польза редиректа?</h2> <p>Благодаря редиректу, вы можете осуществлять перенаправление пользователей с одной веб-страницы на другую. Также, если например, на вашем сайте тексты ссылок на статьи пребывают в неприглядном виде (набор цифр или знаков), их можно изменить, применив транслитерацию и сделав редирект на эти ссылки. Возможности перенаправления практически неограниченны! Польза этого метода для повышения индексации страниц, улучшения показателей сайта, привлечения пользователей очевидна.</p> <p><span class="Xf6dVRetPVY"></span></p> <p>Послать каждый может. А вот правильно перенаправить – это целое искусство. Но еще труднее дается перенаправление пользователей на нужный путь в интернете. Для этого лучше всего подходит редирект на php .</p> <h2>Что за редирект?</h2> <p>В веб-программировании возникают ситуации, когда нужно перенаправить пользователя, переходящего по ссылке, на другой адрес. Конечно, на первый взгляд реализация такого перенаправления выглядит немного «незаконной ». На практике же, такой редирект востребован не только среди злоумышленников, но и среди честных вебмастеров:</p> <p>В каких случаях может потребоваться редирект:</p> <ul><li>Когда происходит замена движка сайта – в результате этого меняется архитектура всего ресурса. После чего возникает проблема, как сделать редирект;</li> <li>При перекройке структуры ресурса – происходит добавление, удаление или перенос целых разделов или одного материала. Пока происходит этот процесс, временно можно организовать перенаправление пользователя на нужный раздел;</li> <li>Если сайт недавно сменил свое доменное имя – после смены имени домена старое еще некоторое время будет фигурировать в поисковой выдаче. В этом случае редирект пользователя на новый домен будет реализован поисковой системой автоматически;</li> <li>В процессе авторизации – как правило, на большом сайте есть две группы пользователей: обычные посетители и администраторы ресурса. В таком случае имеет смысл реализовать редирект каждого пользователя согласно его правам и роли. После авторизации администратор или модераторы сайта попадают в административную часть ресурса, а посетители – на пользовательскую часть ресурса.</li> </ul><h3>Особенности редиректа на php</h3> <p>В отличие от других языков php обладает некоторыми преимуществами в реализации редиректа:</p> <ul><li>Php является серверным языком программирования. Поэтому перенаправление будет происходить не в html коде страниц, отображаемых в браузере, а в скрипте, размещенном на сервере;</li> <li>Редирект на php может быть реализован несколькими способами. Что во многом расширяет его применение;</li> <li>Благодаря обработке данных на сервере перенаправление, реализованное с помощью php, менее восприимчиво к действию фильтров поисковых систем.</li> </ul><p>Для редиректа в php используется функция header() . Она применяется для отправки заголовка http . Ее синтаксис:</p> <p>void header (string $string [, bool $replace = true [, int $http_response_code ]])</p> <p>Принимаемые функцией аргументы:</p> <p><ul><br> <li><b>string $string</b> – строка заголовка;</li><br> </ul></p> <p>Существует два типа этого аргумента. Первый предназначен для отправки кода состояния соединения. Он начинается с "HTTP/". Другой тип вместе с заголовком передает клиентскому браузеру код состояния (REDIRECT 302). Этот аргумент начинается с "Location:"</p> <p><br><img src='https://i2.wp.com/internet-technologies.ru/wp-content/uploads/articles/201411/osobennosti-redirekta-na-300248.jpg' width="100%" loading=lazy></p> <ul><li>bool $replace – является необязательным атрибутом типа bool . Отвечает за переопределение предыдущего заголовка. Если будет задано true , то предыдущий заголовок или заголовки одного типа будут заменены. Если в аргументе задано false , то перезапись заголовка не состоится. По умолчанию, задано значение true ;</li> <li>http_response_code – аргумент принудительно устанавливает код ответа HTTP . Установка кода пройдет успешно при условии, что аргумент string не будет пустым.</li> </ul><p>Код состояния HTTP представляет собой часть верхней строки ответа сервера. Код состоит из трех цифр, после которых идет поясняющая надпись на английском языке. Первая цифра отвечает за класс состояния. Редиректу соответствуют коды от 300 до 307. Их полное описание можно найти в соответствующей технической документации.</p> <p>При использовании функции header() для редиректа внешних ссылок большое значение имеет место расположения ее вызова. В коде он должен находиться выше всех тегов html :</p> <p><br><img src='https://i1.wp.com/internet-technologies.ru/wp-content/uploads/articles/201411/kod-sostojanija-http-300249.jpg' width="100%" loading=lazy></p> <h3>Применение редиректа header()</h3> <p>Для демонстрации действия функции на локальном сервере нужно создать два файла. Один из них назовем redirect.php , а другой redirect2.php . Внутри первого разместим вызов функции в следующем формате:</p> <p><?php header("Location: http://localhost/ redirec2t.php "); ?></p> <p>В другом файле помещаем строку:</p> <p>echo "Привет! Вы находитесь в файле redirect2.php";</p> <p><br><img src='https://i2.wp.com/internet-technologies.ru/wp-content/uploads/articles/201411/privet-vi-nahodites-v-f-300258.jpg' width="100%" loading=lazy></p> <p>Еще несколько практических примеров использования редиректа на php :</p> <ul><li>Принудительная передача кода состояния http – при использовании первого аргумента функции header() типа «<span>location </span>» по умолчанию в заголовок передается код состояния «<span>302 </span>» (<span>временно перемещен </span>). Это может стать проблемой при переносе ресурса на другое доменное имя. В поисковиках такое временное перенаправление может затянуться. Ведь поисковик постоянно анализирует код состояния. А в нем записано «<span>временно перемещен </span>». Пример принудительной перезаписи кода состояния «<span>302 </span>» на «<span>301 </span>» (<span>постоянно перемещен </span>):</li> </ul><p><?php header("Location: http://localhost/redirect2.php",true, 301); ?></p> <p>Также перезапись возможна в два этапа. Первая строка производит перезапись кода состояния, а вторая перенаправляет на новый адрес:</p> <p><?php header("HTTP/1.1 301 Moved Permanently"); header("Location: http://redirect2.php"); ?></p> <ul><li>Использование редиректа внешних ссылок для перенаправления в зависимости от роли пользователя. Роль определяется во время процедуры аутентификации. Значение для обработки записывается в переменную $who :</li> </ul><p><?php switch ($who){ case "user": $redirect_url = "/blog.html"; break; case "author": $redirect_url = "/author.html"; break; case "admin": $redirect_url = "/admin.html"; break; default: $redirect_url = "/registration.html"; } header("HTTP/1.1 200 OK"); header("Location: http://".$_SERVER["HTTP_HOST"].$redirect_url); exit(); ?></p> <ul><li>Упрощенный практический пример реализации редиректа внешней ссылки – клик по ссылке ведет на страницу php . Отсюда пользователя через 5 секунд перекидывает на Рамблер. Код html :</li> </ul><p>Нажми меня</p> <p>Код файла redirect3.php :</p> <p><?php header("Refresh: 5; url=http://rambler.ru/"); echo "Привет!Через 5 секунд вас выкинет на Рамблер))"; ?></p> <p><br><img src='https://i0.wp.com/internet-technologies.ru/wp-content/uploads/articles/201411/kod-faila-300252.jpg' width="100%" loading=lazy></p> <p>Ну, вот мы и научились основам редиректа на php. Теперь можно смело браться за перенаправление пользователей в нужное русло. Главное не ошибиться в направлении, а то приведете всех своих юзеров на чужой сайт…</p> <script type="text/javascript"> <!-- var _acic={dataProvider:10};(function(){var e=document.createElement("script");e.type="text/javascript";e.async=true;e.src="https://www.acint.net/aci.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})() //--> </script><br> <br> <script>document.write("<img style='display:none;' src='//counter.yadro.ru/hit;artfast_after?t44.1;r"+ escape(document.referrer)+((typeof(screen)=="undefined")?"": ";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth? screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+";h"+escape(document.title.substring(0,150))+ ";"+Math.random()+ "border='0' width='1' height='1' loading=lazy>");</script> </div> </div> </article> </div> </div> <div id="secondary"> <aside id="search-2" class="widget widget_search clearfix"> <form action="/" class="search-form searchform clearfix" method="get"> <div class="search-wrap"> <input type="text" placeholder="Поиск" class="s field" name="s"> <button class="search-icon" type="submit"></button> </div> </form> </aside> <aside id="recent-posts-2" class="widget widget_recent_entries clearfix"> <h3 class="widget-title"><span>Свежие записи</span></h3> <ul> <li> <a href="/services/kak-na-androide-pereklyuchit-pamyat-na-kartu-kak-sdelat-tak-chtoby-vse.html">Как сделать так, чтобы все сохранялось на карту памяти</a> </li> <li> <a href="/rates/kak-s-pomoshchyu-kompasa-nastroit-sputnikovuyu-antennu.html">Подключение спутникового ресивера к телевизору</a> </li> <li> <a href="/rostelecom/ne-zagruzhaet-gugl-plei-na-telefone-ne-rabotaet-play-market-podklyuchenie.html">Не работает Play Market, подключение отсутствует</a> </li> <li> <a href="/tele2/ustanovka-melodii-na-otdelnyi-kontakt-na-android-kak-postavit-melodiyu-na.html">Как поставить мелодию на контакт на "Андроид": советы, рекомендации, инструкции Как установить мелодию на группу контактов андроид</a> </li> <li> <a href="/internet/plei-market-versiya-2-3-6-servisy-google-play-vozmozhnosti-i-osobennosti.html">Плей маркет версия 2.3 6. Сервисы Google Play. Возможности и особенности приложения Сервисы гугл плей</a> </li> <li> <a href="/megaphone/upravlenie-linux-cherez-web-administrirovanie-linux-vvedenie-v-webmin-nastroika.html">Управление linux через web</a> </li> <li> <a href="/services/chto-delat-esli-v-nedforspid-chernyi-ekran-pochemu-nfs-rivals-ne.html">Почему NFS Rivals не запускается?</a> </li> <li> <a href="/beeline/ne-pokazyvaet-cifrovoe-kabelnoe-televidenie-kak-opredelit-pochemu-ne-rabotaet.html">Как определить, почему не работает цифровое телевидение</a> </li> </ul> </aside> <aside id="text-5" class="widget widget_text clearfix"> <div class="textwidget"> <script type="text/javascript" src="//vk.com/js/api/openapi.js?144"></script> <div id="vk_groups"></div> </div> </aside> <aside id="text-4" class="widget widget_text clearfix"> <div class="textwidget"> <div id="pugoza1" style="height:500px;width:300px;" align="center"></div> </div> </aside> <aside id="text-3" class="widget widget_text clearfix"> <div class="textwidget"> <div id="pugoza2" style="height:500px;width:300px;" align="center"></div> </div> </aside> </div> </div> </div> <footer id="colophon" class="clearfix"> <div class="footer-socket-wrapper clearfix"> <div class="inner-wrap"> <div class="footer-socket-area"> <div class="footer-socket-right-section"> </div> <div class="footer-socket-left-sectoin"> <div class="copyright">© 2024 <a href="/" title="thetarif.ru"><span>thetarif.ru</span></a>. Мобильные операторы и тарифы.<br></div> </div> </div> </div> </div> </footer> <a href="#masthead" id="scroll-up"><i class="fa fa-chevron-up"></i></a> </div> <script type="text/javascript"> var q2w3_sidebar_options = new Array(); q2w3_sidebar_options[0] = { "sidebar": "colormag_right_sidebar", "margin_top": 10, "margin_bottom": 0, "stop_id": "", "screen_max_width": 0, "screen_max_height": 0, "width_inherit": false, "refresh_interval": 1500, "window_load_hook": false, "disable_mo_api": false, "widgets": ['text-3'] }; </script> <script type="text/javascript"> (function(w, doc) { if (!w.__utlWdgt) { w.__utlWdgt = true; var d = doc, s = d.createElement('script'), g = 'getElementsByTagName'; s.type = 'text/javascript'; s.charset = 'UTF-8'; s.async = true; s.src = ('https:' == w.location.protocol ? 'https' : 'http') + '://w.uptolike.com/widgets/v1/uptolike.js'; var h = d[g]('body')[0]; h.appendChild(s); } })(window, document); </script> <div style="text-align:left;" data-lang="ru" data-url="/global-blue-vozvrat-tax-free-v-minske/" data-background-alpha="0.0" data-buttons-color="#FFFFFF" data-counter-background-color="#ffffff" data-share-counter-size="12" data-top-button="false" data-share-counter-type="common" data-share-style="1" data-mode="share" data-like-text-enable="false" data-mobile-view="true" data-icon-color="#ffffff" data-orientation="fixed-left" data-text-color="#000000" data-share-shape="round-rectangle" data-sn-ids="fb.vk.tw.ok.gp.ps.mr.ln." data-share-size="30" data-background-color="#ffffff" data-preview-mobile="false" data-mobile-sn-ids="fb.vk.ok.wh.vb." data-pid="cmsvpolshuby" data-counter-background-alpha="1.0" data-following-enable="false" data-exclude-show-more="true" data-selection-enable="true" class="uptolike-buttons"></div> <script type='text/javascript' src='https://thetarif.ru/wp-content/plugins/pwebcontact/media/bootstrap-2.3.2/js/bootstrap.min.js?ver=2.3.2'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/plugins/pwebcontact/media/js/jquery.validate.min.js?ver=1.15.0'></script> <script type='text/javascript'> /* <![CDATA[ */ var pwebcontact_l10n = pwebcontact_l10n || {}; pwebcontact_l10n.form = { "INIT": "Initializing form...", "SENDING": "Sending...", "SEND_ERR": "Wait a few seconds before sending next message", "REQUEST_ERR": "Request error: ", "COOKIES_ERR": "Enable cookies and refresh page to use this form" }; /* ]]> */ </script> <script type='text/javascript' src='https://thetarif.ru/wp-content/plugins/pwebcontact/media/js/jquery.pwebcontact.min.js?ver=2.3.0'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/plugins/simple-tooltips/zebra_tooltips.js?ver=4.4.13'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/plugins/contact-form-7/includes/js/jquery.form.min.js?ver=3.51.0-2014.06.20'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/plugins/contact-form-7/includes/js/scripts.js?ver=4.5.1'></script> <script type='text/javascript'> /* <![CDATA[ */ var tocplus = { "visibility_show": "\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c", "visibility_hide": "\u0441\u043a\u0440\u044b\u0442\u044c", "width": "Auto" }; /* ]]> */ </script> <script type='text/javascript' src='https://thetarif.ru/wp-content/plugins/table-of-contents-plus/front.min.js?ver=1509'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/plugins/wp-cloudy/js/wp-cloudy-ajax.js?ver=4.4.13'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/plugins/mistape/assets/js/modernizr.custom.js?ver=1.3.3'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/plugins/mistape/assets/js/mistape-front.js?ver=1.3.3'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/themes/colormag/js/jquery.bxslider.min.js?ver=4.1.2'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/themes/colormag/js/colormag-slider-setting.js?ver=4.4.13'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/themes/colormag/js/navigation.js?ver=4.4.13'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/themes/colormag/js/fitvids/jquery.fitvids.js?ver=20150311'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/themes/colormag/js/fitvids/fitvids-setting.js?ver=20150311'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/plugins/q2w3-fixed-widget/js/q2w3-fixed-widget.min.js?ver=5.0.4'></script> <script type='text/javascript' src='/wp-includes/js/wp-embed.min.js?ver=4.4.13'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/plugins/easy-fancybox/fancybox/jquery.fancybox-1.3.8.min.js?ver=1.6.2'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/plugins/easy-fancybox/js/jquery.easing.min.js?ver=1.4.0'></script> <script type='text/javascript' src='https://thetarif.ru/wp-content/plugins/easy-fancybox/js/jquery.mousewheel.min.js?ver=3.1.13'></script> <div id="pwebcontact1" class="pwebcontact pweb-bottom pweb-offset-right pweb-slidebox pweb-theme-free pweb-labels-above pweb-horizontal" dir="ltr"> <div id="pwebcontact1_toggler" class="pwebcontact1_toggler pwebcontact_toggler pweb-closed pweb-theme-free"> <span class="pweb-text">Есть вопросы?</span> <span class="pweb-icon"></span> </div> <div id="pwebcontact1_box" class="pwebcontact-box pweb-slidebox pweb-theme-free pweb-labels-above pweb-horizontal pweb-init" dir="ltr"> <div class="pwebcontact-container-outset"> <div id="pwebcontact1_container" class="pwebcontact-container"> <div class="pwebcontact-container-inset"> <form name="pwebcontact1_form" id="pwebcontact1_form" class="pwebcontact-form" action="/" method="post" accept-charset="utf-8"> <div class="pweb-fields"> <div class="pweb-row"> <div> <div class="pweb-field-container pweb-field-name pweb-field-name"> <div class="pweb-label"> <label id="pwebcontact1_field-name-lbl" for="pwebcontact1_field-name"> Имя </label> </div> <div class="pweb-field"> <div class="pweb-field-shadow"> <input type="text" name="fields[name]" id="pwebcontact1_field-name" autocomplete="on" class="pweb-input" value="" data-role="none"> </div> </div> </div> </div> </div> <div class="pweb-row"> <div> <div class="pweb-field-container pweb-field-email pweb-field-email"> <div class="pweb-label"> <label id="pwebcontact1_field-email-lbl" for="pwebcontact1_field-email"> Email <span class="pweb-asterisk">*</span> </label> </div> <div class="pweb-field"> <div class="pweb-field-shadow"> <input type="email" name="fields[email]" id="pwebcontact1_field-email" autocomplete="on" class="pweb-input required" value="" data-role="none"> </div> </div> </div> </div> </div> <div class="pweb-row"> <div> <div class="pweb-field-container pweb-field-textarea pweb-field-message"> <div class="pweb-label"> <label id="pwebcontact1_field-message-lbl" for="pwebcontact1_field-message"> Сообщение <span class="pweb-asterisk">*</span> </label> </div> <div class="pweb-field"> <div class="pweb-field-shadow"> <textarea name="fields[message]" id="pwebcontact1_field-message" cols="50" rows="5" class="required" data-role="none"></textarea> </div> </div> </div> </div> </div> <div class="pweb-row"> <div> <div class="pweb-field-container pweb-field-buttons"> <div class="pweb-field"> <button id="pwebcontact1_send" type="submit" class="btn pweb-button-send" data-role="none">Отправить</button> </div> </div> </div> </div> </div> <div class="pweb-msg pweb-msg-after"> <div id="pwebcontact1_msg" class="pweb-progress"> <script type="text/javascript"> document.getElementById("pwebcontact1_msg").innerHTML = "Initializing form..." </script> </div> </div> <input type="hidden" name="5eb40beb9e" value="1" id="pwebcontact1_token"> </form> </div> </div> </div> </div> </div> <script type="text/javascript"> jQuery(function() { jQuery(".tooltips img").closest(".tooltips").css("display", "inline-block"); new jQuery.Zebra_Tooltips(jQuery('.tooltips').not('.custom_m_bubble'), { 'background_color': '#000000', 'color': '#ffffff', 'max_width': 250, 'opacity': 0.95, 'position': 'center' }); }); </script> <script type="text/javascript"> jQuery(document).on('ready post-load', function() { jQuery('.nofancybox,a.pin-it-button,a[href*="pinterest.com/pin/create"]').addClass('nolightbox'); }); jQuery(document).on('ready post-load', easy_fancybox_handler); jQuery(document).on('ready', easy_fancybox_auto); </script> <div id="mistape_dialog" data-mode="comment" data-dry-run="0"> <div class="dialog__overlay"></div> <div class="dialog__content"> <div id="mistape_confirm_dialog" class="mistape_dialog_screen"> <div class="dialog-wrap"> <div class="dialog-wrap-top"> <h2>Сообщить об опечатке</h2> <div class="mistape_dialog_block"> <h3>Текст, который будет отправлен нашим редакторам:</h3> <div id="mistape_reported_text"></div> </div> </div> <div class="dialog-wrap-bottom"> <div class="mistape_dialog_block comment"> <h3><label for="mistape_comment">Ваш комментарий (необязательно):</label></h3> <textarea id="mistape_comment" cols="60" rows="3" maxlength="1000"></textarea> </div> <div class="pos-relative"> </div> </div> </div> <div class="mistape_dialog_block"> <a class="mistape_action" data-action="send" data-id="389" role="button">Отправить</a> <a class="mistape_action" data-dialog-close role="button" style="display:none">Отмена</a> </div> <div class="mistape-letter-front letter-part"> <div class="front-left"></div> <div class="front-right"></div> <div class="front-bottom"></div> </div> <div class="mistape-letter-back letter-part"> <div class="mistape-letter-back-top"></div> </div> <div class="mistape-letter-top letter-part"></div> </div> </div> </div> </body> </html>