<?php /* Функция проверки $_GET links. */ foreach ($_GET as $links) { if(!is_string($links) || !preg_match('#^(?:[a-z0-9_-/]+|.+(?!/))*$#i', $links)) { header('Location: http://'.URL); exit(); } } unset($links); ?>