BlackHalt writeln (by me or from manual) PHP source Codes ...

Headers

<?php
//Get charset from headers
$url='http://rus.delfi.lv/';
$res=get_headers($url,1);
$charset=explode('charset=',$res['Content-Type']);
$html=iconv($charset[1],'utf-8',file_get_contents($url));
echo 
$html;
?>