Getting the page title requires loading the page, parsing the HTML and extracting the title.
So something like:
// Assume $url contains the page address
$content = file_get_contents($url); // Assumptions: allow_url_fopen is on, you have some nice global error handler
$dom = DOMDocument::loadHTML($content); // Assumption: document is either in latin1 or contains a meta http-equiv content-type tag
$titles = $dom->getElementsByTagName('title');
$titlenode = $titles->item(0); // Assumption: There is at least one title element on the page
$title = $titlenode->nodeValue; // Assigns title, IN UTF8 REGARDLESS OF PAGE ENCODING!
// NB: DOM works internally in utf8 regardless of the encoding of the original document or your page.
See?
Some pages I recommend you test it on:
http://www.pravda.ru/
http://news.bbc.co.uk/hi/arabic/news/
If it gets the Arabic right from BBC Arabic and the Russian right from Pravda, it probably works.
Mark
Mark