<?php
function get_title($url){
$str = file_get_contents($url);
if(strlen($str)>0){
$str = trim(preg_replace('/\s+/', ' ', $str)); // supports line breaks inside <title>
preg_match("/\<title\>(.*)\<\/title\>/i",$str,$title); // ignore case
return $title[1];
}
}
//Example:
echo get_title("http://www.washingtontimes.com/");
?>$words = array('Привет', 'привет', 'Хай', 'хай', 'Хэй', 'Хэллоу');
$impl = implode('%', $words);
$where = "TEXT LIKE '%{$impl}%'";if($_GET['set_theme'] == 'desktop'){
//устанавливаете desktop.css и сохраняете в сессии
} $query= $mysqli->query("select id, name from projects limit 5");
while($project = $query->fetch_assoc()){
$news_query = $mysqli->query("select * from news where `project_id` = {$project[id]} order by `pubdate` desc limit 5");
while($news = $news_query ->fetch_assoc()){
echo $news['title'];
}
}