<?PHP
$icerik = file_get_contents("http://blog.ni.net.tr/feed/atom/");
$icerik = str_replace(array("\n","\r"), "", $icerik);
preg_match_all('#<title type="html"><(.*?)></title>#si',$icerik,$bulsana,PREG_SET_ORDER);
preg_match_all('#<link rel="alternate" type="text/html" href="(.*?)" />#si',$icerik,$hooyt,PREG_SET_ORDER);
$sayabi=count($bulsana);
for($fatal=0;$fatal<=$sayabi;$fatal++)
{
$baslik=$bulsana[$fatal][1];
$baslik=str_replace("![CDATA[","",$baslik);
$baslik=str_replace("]]","",$baslik);
$baslik = mb_convert_encoding($baslik, "ISO-8859-9", mb_detect_encoding($baslik, "UTF-8, ISO-8859-1, ISO-8859-15", true));
echo "<a href=\"".$hooyt[$fatal+1][1]."\">$baslik</a>"; echo"<br>";
}
?> RSS de sadece başlıkları çekmek
30
●3.031
- 02-07-2008, 18:39:17şunu dene bakalım
- 02-07-2008, 18:40:40
function ajaxturkishreplace($newphrase) { $newphrase = str_replace("Ü","Ü",$newphrase); $newphrase = str_replace("Åž","Ş",$newphrase); $newphrase = str_replace("Äž","Ğ",$newphrase); $newphrase = str_replace("Ç","Ç",$newphrase); $newphrase = str_replace("İ","İ",$newphrase); $newphrase = str_replace("Ö","Ö",$newphrase); $newphrase = str_replace("ü","ü",$newphrase); $newphrase = str_replace("ÅŸ","ş",$newphrase); $newphrase = str_replace("ç","ç",$newphrase); $newphrase = str_replace("ı","ı",$newphrase); $newphrase = str_replace("ö","ö",$newphrase); $newphrase = str_replace("ÄŸ","ğ",$newphrase); return $newphrase; } ' EmirX - (geç cevap verebilirim): kendi pc emde değilim fonklarım var dı da ' EmirX - (geç cevap verebilirim): yoh malesef ' EmirX - (geç cevap verebilirim): function ajaxturkishreplace($newphrase) { $newphrase = str_replace("Ü","Ü",$newphrase); $newphrase = str_replace("Åž","Ş",$newphrase); $newphrase = str_replace("Äž","Ğ",$newphrase); $newphrase = str_replace("Ç","Ç",$newphrase); $newphrase = str_replace("İ","İ",$newphrase); $newphrase = str_replace("Ö","Ö",$newphrase); $newphrase = str_replace("ü","ü",$newphrase); $newphrase = str_replace("ÅŸ","ş",$newphrase); $newphrase = str_replace("ç","ç",$newphrase); $newphrase = str_replace("ı","ı",$newphrase); $newphrase = str_replace("ö","ö",$newphrase); $newphrase = str_replace("ÄŸ","ğ",$newphrase); return $newphrase; } ' EmirX - (geç cevap verebilirim): bunla idare etbir arkadaşım bunu yazdı ama nasıl kullanacağım konusunda bir fikrim yok
direk yazsammı
şuan scriptin son hali bu
Smarty olarak
<div style='border:1px solid #c0c0c0;width:375px;height:175px;'> <table width="100%" height="169" border="0" cellpadding="5" cellspacing="0"> <tr> <td width="180" height="30" bgcolor="#ACABB0"><strong><font color="#FFFFFF">:: Haberler</font></strong></td> </tr> <tr> <td height="140" align="left" valign="top" bgcolor="#EEEEEE"> <meta http-equiv="Content-Type" content="text/html; charset=utf8" /> {php} $icerik = file_get_contents("http://blog.ni.net.tr/feed/atom/"); $icerik = str_replace(array("\n","\r"), "", $icerik); preg_match_all('#<title type="html"><(.*?)></title>#si',$icerik,$bulsana,PREG_SET_ORDER); preg_match_all('#<link rel="alternate" type="text/html" href="(.*?)" />#si',$icerik,$hooyt,PREG_SET_ORDER); $sayabi=count($bulsana); for($fatal=0;$fatal<=$sayabi;$fatal++) { $baslik=$bulsana[$fatal][1]; $baslik=str_replace("![CDATA[","",$baslik); $baslik=str_replace("]]","",$baslik); echo "<img src=\"images/announcement.gif\" width=\"17\" height=\"17\" class=\"image\" /> <a href=\"".$hooyt[$fatal+1][1]."\">$baslik</a>"; echo"<br>"; } {/php} </td> </tr> </table> - 02-07-2008, 18:45:09Üyeliği durdurulduArkadaşın dediğim gibi str replace i önermiş
smarty hiç kullanmadım.içine fonksiyon alıyordur inşallah
<div style='border:1px solid #c0c0c0;width:375px;height:175px;'> <table width="100%" height="169" border="0" cellpadding="5" cellspacing="0"> <tr> <td width="180" height="30" bgcolor="#ACABB0"><strong><font color="#FFFFFF">:: Haberler</font></strong></td> </tr> <tr> <td height="140" align="left" valign="top" bgcolor="#EEEEEE"> {php} function osmanaga($newphrase) { $newphrase = str_replace("Ü","Ü",$newphrase); $newphrase = str_replace("Åz","Ş",$newphrase); $newphrase = str_replace("Äz","Ğ",$newphrase); $newphrase = str_replace("Ç","Ç",$newphrase); $newphrase = str_replace("İ","İ",$newphrase); $newphrase = str_replace("Ö","Ö",$newphrase); $newphrase = str_replace("ü","ü",$newphrase); $newphrase = str_replace("ÅŸ","ş",$newphrase); $newphrase = str_replace("ç","ç",$newphrase); $newphrase = str_replace("ı","ı",$newphrase); $newphrase = str_replace("ö","ö",$newphrase); $newphrase = str_replace("ÄŸ","ğ",$newphrase); return $newphrase; } $icerik = file_get_contents("http://blog.ni.net.tr/feed/atom/"); $icerik = str_replace(array("\n","\r"), "", $icerik); preg_match_all('#<title type="html"><(.*?)></title>#si',$icerik,$bulsana,PREG_SET_ORDER); preg_match_all('#<link rel="alternate" type="text/html" href="(.*?)" />#si',$icerik,$hooyt,PREG_SET_ORDER); $sayabi=count($bulsana); for($fatal=0;$fatal<=$sayabi;$fatal++) { $baslik=$bulsana[$fatal][1]; $baslik=str_replace("![CDATA[","",$baslik); $baslik=str_replace("]]","",$baslik); $baslik = osmanaga($baslik); echo "<img src=\"images/announcement.gif\" width=\"17\" height=\"17\" class=\"image\" /> <a href=\"".$hooyt[$fatal+1][1]."\">$baslik</a>"; echo"<br>"; } {/php} </td> </tr> </table> - 02-07-2008, 18:48:54Üyeliği durdurulduBuda iconv versiyonu
<div style='border:1px solid #c0c0c0;width:375px;height:175px;'> <table width="100%" height="169" border="0" cellpadding="5" cellspacing="0"> <tr> <td width="180" height="30" bgcolor="#ACABB0"><strong><font color="#FFFFFF">:: Haberler</font></strong></td> </tr> <tr> <td height="140" align="left" valign="top" bgcolor="#EEEEEE"> {php} $icerik = file_get_contents("http://blog.ni.net.tr/feed/atom/"); $icerik = str_replace(array("\n","\r"), "", $icerik); preg_match_all('#<title type="html"><(.*?)></title>#si',$icerik,$bulsana,PREG_SET_ORDER); preg_match_all('#<link rel="alternate" type="text/html" href="(.*?)" />#si',$icerik,$hooyt,PREG_SET_ORDER); $sayabi=count($bulsana); for($fatal=0;$fatal<=$sayabi;$fatal++) { $baslik=$bulsana[$fatal][1]; $baslik=str_replace("![CDATA[","",$baslik); $baslik=str_replace("]]","",$baslik); $baslik = iconv("UTF-8", "ISO-8859-9", $baslik); echo "<img src=\"images/announcement.gif\" width=\"17\" height=\"17\" class=\"image\" /> <a href=\"".$hooyt[$fatal+1][1]."\">$baslik</a>"; echo"<br>"; } {/php} </td> </tr> </table> - 02-07-2008, 19:24:16
- 02-07-2008, 19:30:15güzel oldu güzel, tr karakter sorunu için hangi fonksiyonu kullandın ?Ni-Osman adlı üyeden alıntı: mesajı görüntüle

direk yazsammı