Merhaba

Aklıma gelmişken dosyanızı UFT-8 BOMSUZ olarak dönüştürdüğünüzü var sayıyorum.

NOTEPAD++ > KODLAMA >UTF-8 BOMSUZ OLARAK DÖNÜŞTÜR

Göndermiş olduğunuz sayfadaki kodun entegreli hali


function trtrans ($str) {

$trans = array("ÄŸ" => "ğ",
"Ä".chr(158) => "Ğ",
"ı" => "ı",
"Ä°" => "İ",
"ç" => "ç",
"Ç" => "Ç",
"ü" => "ü",
"Ãœ" => "Ü",
"ö" => "ö",
"Ö" => "Ö",
"Å".chr(158) => "Ş",
"ÅŸ" => "ş",
"ß" => "ß",
"ä" => "ä",
"Ã".chr(132) => "Ä"
);
$out = strtr($str, $trans);
$badwordchars=array(
"\xe2\x80\x98","\xe2\x80\x99","\xe2\x80\x9a",
"\xe2\x80\x9b","\xe2\x80\xb2","\xe2\x80\xb5",
"\xe2\x80\x9c","\xe2\x80\x9d","\xe2\x80\x9e",
"\xe2\x80\x9f","\xe2\x80\xb3","\xe2\x80\xb6",
"\xe2\x80\xa6","\xe2\x82\xac","\xe2\x86\x92",
"\xe2\x86\x90","\xe2\x86\x91","\xe2\x86\x93",
"\xe2\x80\x94"
);
$fixedwordchars=array(
"‘","´","‚",
"?","'","'",
""",""","„",
"?","¨","?",
"…","€","›",
"‹","^","v",
"—"
);
$out=str_replace($badwordchars,$fixedwordchars,$out);
return $out;
}

function rssoku()
{
$feed=file_get_contents("http://localhost/syndication.php");
$xml= new SimpleXMLElement($feed);
$sayac="1";
$limit="4";
echo "
    ";
    foreach ($xml -> channel -> item as $veri){
    if ($sayac <= $limit){
    $link = $veri -> link;
    $title= $veri -> title;
    $title = mb_convert_encoding($title, "UTF-8", "ISO-8859-9");
    $title = trtrans($title);
    $length = strlen($title);
    if($length > 44)
    {
    $new = substr($title,0,44);
    $title = $new."...";
    }
    echo "
  • $title";

    }
    $sayac++;
    }
    echo "
";
}
rssoku();
?>