([^<]+)<\/title>/', $line, $matches)) {
if (preg_match('/
([^<]+)', $line, $matches)) {
$title = $matches[1];
}
if (!$is_search1) {
// if (preg_match('/バックセット(:|\x81\x46)' . $search_str1 . '/', $line)) {
if (mb_ereg('バックセット[::]' . $search_str1, $line)) {
$is_search1 = true;
}
}
if (!$is_search2) {
// if (preg_match('/ビスピッチ[::]' . $search_str2 . '/', $line)) {
if (mb_ereg('ビスピッチ[::]' . $search_str2, $line)) {
$is_search2 = true;
}
}
if ($is_search1 && $is_search2) {
break;
}
}
fclose($fp);
if ($is_search1 && $is_search2) {
$result_list[] = array('filename' => $filename, 'title' => $title);
$hit_count++;
}
}
}
}
closedir($dh);
usort($result_list, 'sortExecute');
$result_html = $hit_count . '件がヒットしました
';
foreach ($result_list as $rec) {
$result_html .= '' . $rec['title'] . '
';
}
}
}
// トップページ
else {
}
function sortExecute($a, $b) {
return strcmp($a['title'], $b['title']);
}
$search_list1 = '';
$search_list2 = '';
for ($i = 0; $i < count($SEARCH1); $i++) {
$selected = $request['search1'] == $i ? ' selected="selected"' : '';
$search_list1 .= '';
}
for ($i = 0; $i < count($SEARCH2); $i++) {
$selected = $request['search2'] == $i ? ' selected="selected"' : '';
$search_list2 .= '';
}
//header('Content-type: text/html; charset=Shift_JIS');
$agent = $_SERVER['HTTP_USER_AGENT'];
if(preg_match('/DoCoMo/', $agent)){
header('Content-Type: application/xhtml+xml; charset=SJIS');
echo '';
}
else if(preg_match("/^UP.Browser|^KDDI/", $agent)){
header("Content-type: text/html; charset=Shift_JIS");
echo '';
}
else if(preg_match("/^J-PHONE|^Vodafone|^SoftBank/", $agent)){
echo '';
header("Content-type: text/html; charset=Shift_JIS");
echo '';
}
include_once('search.html');
?>