4
122
$adres= $_SERVER['REQUEST_URI'];
function baslik($url) { $data = file_get_contents($url); $title = preg_match('/<title[^>]*>(.*?)<\/title>/ims', $data, $matches) ? $matches[1] : null; return $title; } $adres = baslik('https://'.$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI]);