Добрый вечер форумчане!!! Помогите доработать скрипт. Спойлер: Код PHP: <?php header('Content-Type: text/html; charset=utf-8'); ini_set('error_reporting', E_ALL); ini_set('display_errors', 1); ini_set('display_startup_errors', 1); $arr_cms=array( 'WordPress' => 'content="WordPress', 'WordPress_2' => '/wp-content/themes/', 'Bitrix' => '/bitrix/' ); // таймаут (сколько ждать ответа сайта) $tm_out=10; // сек. function pars_url($str){ $str=str_ireplace('https://','',$str); $str=str_ireplace('http://','',$str); $arr=array(); $arr=explode("\n",$str); $arr=array_unique($arr); return $arr; } function simple_curl($url){ global $tm_out; $curl = curl_init(); curl_setopt($curl, CURLOPT_RETURNTRANSFER,1); curl_setopt($curl, CURLOPT_AUTOREFERER,true); curl_setopt($curl, CURLOPT_FOLLOWLOCATION,true); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $tm_out); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curl, CURLOPT_URL, $url); $x = curl_exec($curl); return $x; } function rrr($str) { global $arr_cms; $arr=array(0=>'Неизвестно',1=>''); foreach ($arr_cms as $a=>$b){ $pos = stripos($str, $b); if ($pos===false) {}else { $arr[1]=$b; $arr[0]=$a; return $arr; } } return $arr; } $f=array(); if (isset($_POST['url']) && ($_POST['url'] != '' )){ $arr=pars_url($_POST['url']); echo '<center>'; foreach ($arr as $a=>$b){ $content = simple_curl('http://'.trim($b)); $f=rrr($content); echo 'Цмс: <b>' . $f[0].'</b>'; echo ' ('.$f[1].') '; echo ' Сайт: <b>'. $b.'</b><br>'."\n"; } echo '</center>'; } else { echo $frm=' <html> <head> <title>Проверка</title> </head> <body> <h1>Введите урл (без http:// и https:// )</h1> <form action="index.php" method="post"> <textarea rows="10" cols="45" name="url"></textarea><br> <input type="submit" value="Go"> </form> </body> </html>'; } 1. Как добавить возможность определения по регулярным выражениям? Спойлер: Регулярные выражения для Wordpress html "<link rel=[\"']stylesheet[\"'] [^>]+wp-(?:content|includes)" "<link[^>]+s\\d+\\.wp\\.com" js "wp_username": "" meta "generator": "WordPress( [\\d.]+)?\\;version:\\1" script "/wp-includes/" website "http://wordpress.org" Спойлер: Регулярные выражения для 1C-Bitrix headers "Set-Cookie": "BITRIX_" "X-Powered-CMS": "Bitrix Site Manager" html "(?:<link[^>]+components/bitrix|(?:src|href)=\"/bitrix/(?:js|templates))" script "1c-bitrix" website "http://www.1c-bitrix.ru" 2. Сделать обработку запроса через ajax