<?php
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true);
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
/**
* RSS2 Feed Template for displaying RSS2 Posts feed.
*
* @package WordPress
* TARATUR
*/
function getLastCategory ($allcategories)
{
$catArray = explode("\n",$allcategories);
$lastCat = $catArray[count($catArray)-2];
return $lastCat;
}
function transliterate($textCyrillic){
$cyr = array(
'а' ,'б' ,'в' ,'г' ,'д' ,'ѓ' ,'е' ,'ж' ,'з' ,'ѕ' ,'и' ,'ј' ,'к' ,'л' ,'љ' ,'м' ,'н' ,'њ' ,'о' ,'п' ,'р' ,'с' ,'т' ,'ќ' ,'у' ,'ф' ,'х' ,'ц' ,'ч' ,'џ' ,'ш' ,
'А' ,'Б' ,'В' ,'Г' ,'Д' ,'Ѓ' ,'Е' ,'Ж' ,'З' ,'Ѕ' ,'И' ,'Ј' ,'К' ,'Л' ,'Љ' ,'М' ,'Н' ,'Њ' ,'О' ,'П' ,'Р' ,'С' ,'Т' ,'Ќ' ,'У' ,'Ф' ,'Х' ,'Ц' ,'Ч' ,'Џ' ,'Ш','„','”','–','…','Р','“');
$lat = array(
'a' ,'b' ,'v' ,'g' ,'d' ,'gj' ,'e' ,'zh' ,'z' ,'dz' ,'i' ,'j' ,'k' ,'l' ,'lj' ,'m' ,'n' ,'nj' ,'o' ,'p' ,'r' ,'s' ,'t' ,'kj' ,'u' ,'f' ,'h' ,'c' ,'ch' ,'dz', 'sh' ,
'A' ,'B' ,'V' ,'G' ,'D' ,'Gj' ,'E' ,'Zh' ,'Z' ,'Dz' ,'I' ,'J' ,'K' ,'L' ,'Lj' ,'M' ,'N' ,'Nj' ,'O' ,'P' ,'R' ,'S' ,'T' ,'Kj' ,'U' ,'F' ,'H' ,'C' ,'Ch' ,'Dz', 'Sh' ,'"','"','-','...','R','"'); // Ѕ и Џ се исти
return str_replace($cyr, $lat, $textCyrillic);
}
<
$smsContent = transliterate(strip_tags($content));
$smsContent = str_replace(array("\r\n", "\n", "\r"), ' ', $smsContent);
$smsContent = str_replace(" ", ' ', $smsContent);
$smsContent = str_replace("\xc2\xa0", ' ', $smsContent);
$smsContent = preg_replace('!\s+!', ' ', $smsContent);
$smsContent = substr($smsContent, 0, 300);
$smsContent = substr($smsContent,0,strrpos($smsContent," "));
$smsContent = preg_replace('/[^\00-\255]+/u', '', $smsContent);
?>
<SMStext><?php echo $smsContent; ?></SMStext>
- Output for 7.0.0 - 7.0.17, 7.1.0 - 7.1.3
- Parse error: syntax error, unexpected '<', expecting end of file in /in/vAc41 on line 28
Process exited with code 255.
preferences:
167.96 ms | 1395 KiB | 29 Q