شوّيت: شبكة كرة قدم اجتماعية


العودة   سوالف سوفت > سوالف برمجة المواقع وتطويرها > PHP
التسجيل المدوّنات البحث مشاركات اليوم جعل الأقسام مقروءة

الرد على الموضوع
 
LinkBack أدوات الموضوع
عضو نشيط جدا
#1  
كيفية التعامل مع هذه الحروف الخاصة ؟

السلام عليكم،

يعرض لي المتصفح الجملة التالية :

أحد الجيران

هكذا :

أحد&.#8237; &.#8236;الجيران&.#8237; &.#8236;

وقد قرات ان الحرفين الخاصين :

#8236& و #8237&

يستعملان للحفاظ على كتابات النصوص ذات الاتجاه LTR داخل النصوص العربية ذات الاتجاه RTL.

إقتباس:
&.#8237; myLTRtext in RTL language &.#8236;
ولكن الامر حسب المثال لدي، فأنه تم اضافة هذين الحرفين رغم وجود نص عربي فقط.

فكيف يتم عرض النص بتعويض/الغاء الخرفين في نص الاخراج على المتصفح ؟

شكراً.






__________________
مجلتي الصغيرة

آخر تعديل بواسطة apitos في 10-03-2010 الساعة 05:43 PM.
apitos is offline   قديم 10-03-2010, 05:38 PM
الرد مع إقتباس
عضو نشيط جدا
#2  

يمكن هذا الرابط يوضح شيئا ما :

http://nexuskirjutab.blogspot.com/






__________________
مجلتي الصغيرة
apitos is offline   قديم 11-03-2010, 05:34 PM
الرد مع إقتباس
عضو نشيط جدا
#3  

الدوال المستعملة في معالجة المدخلات والمخرجات :

كود PHP:
 
//------------------------------------------------------
// معالجة البينات قبل ارسالها الى قاعدة البينات       //
//------------------------------------------------------
    
function format_data($Str)
    {
        
$Str $this->makeSafe($this->escapeStr(stripslashes($Str)));
        return 
$this->add_slashes(strip_tags($Str));
    }
//------------------------------------------------------
//         معالجة النصوص اذا لم يستخدم محرر اتش تي ام ال
//------------------------------------------------------
    
function format_post($Str)
    {
        
$Str $this->makeSafe($this->escapeStr(stripslashes($Str)));
        return 
$this->add_slashes(htmlspecialchars(trim($Str)));
    }
//------------------------------------------------------
//  معالجة النصوص مع استخدام محرر اتش تي ام ال         /
//------------------------------------------------------
    
function format_html_post($Str)
    {
        
$Str $this->makeSafe($Str);
        if(
$this->getsettings("html_tags"))
        {
            
$Str strip_tags($Str,$this->getsettings("html_tags"));
        }
        return 
$this->add_slashes(trim($Str));
    }
//------------------------------------------------------
// معالجة البينات عند عرضها في المتصفح                //
//------------------------------------------------------
    
function format_data_out($Str)
    {
        
$Str preg_replace"#(\?|&|&)(PHPSESSID|s|S)=([0-9a-zA-Z]){32}#e"""$Str );
        return 
trim(nl2br(stripslashes($Str)));
    } 
اظن وجب تغيير/اضافة شيء ما لهذه الدالة :

كود PHP:
//---------------------------------------------------
//------    replace  and clan  functions    ------//
//---------------------------------------------------
    
function makeSafe($Str)
    {
        
$Str preg_replace"#(\?|&|&)(PHPSESSID|s|S)=([0-9a-zA-Z]){32}#e"""$Str );
        
$Str str_replace(array("&","<",">"),array("&","<",">",),$Str);
        
$Str preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*expression[\x00-\x20]*\([^>]*>#iU',"$1>",$Str);
        
$Str preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*behaviour[\x00-\x20]*\([^>]*>#iU',"$1>",$Str);
        if(
version_compare(phpversion(),"5.0.0""<")){
        
$Str preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*>#iUu',"$1>",$Str);
        
$Str preg_replace('#(&\#*\w+)[\x00-\x20]+;#u',"$1;",$Str);
        
$Str preg_replace('#(&\#x*)([0-9A-F]+);*#iu',"$1$2;",$Str);
        
$Str preg_replace('#(<[^>]+[\x00-\x20\"\'])(on|xmlns)[^>]*>#iUu',"$1>",$Str);
        
$Str preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*)[\\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu','$1=$2nojavascript...',$Str);
        
$Str preg_replace('#([a-z]*)[\x00-\x20]*=([\'\"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu','$1=$2novbscript...',$Str);
        }
        
$Str preg_replace('#</*\w+:\w[^>]*>#i',"",$Str);
        do {
            
$oldstring $Str;
            
$string preg_replace('#</*(applet|meta|xml|blink|link|style|script|embed|object|iframe|frame|frameset|ilayer|layer|bgsound|title|base)[^>]*>#i',"",$Str);
        } while (
$oldstring != $Str);
        return 
$Str;
    } 






__________________
مجلتي الصغيرة
apitos is offline   قديم 13-03-2010, 01:27 AM
الرد مع إقتباس
عضو نشيط
#4  

أخي جرب أن تضيف هذا السطر الى الهيدر
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>

و ان لم يعمل معك الرجاء وضع HTML الصفحة التي يظهر فيها الخطأ كاملا

في حفظ الله






__________________
http://servarica.com
Xen VPS and WHMCS Xen Management Addon modules
support@servarica.com
idontknow is offline   قديم 13-03-2010, 05:13 AM
الرد مع إقتباس
عضو نشيط جدا
#5  

اهلا اخي الكريم.

هنا في هذا الموضوع، تجد مرفق ملف صفحة الاندكس :

http://www.swalif.net/softs/swalif44/softs279913/

صورة توضيحية للمشكل :







__________________
مجلتي الصغيرة

آخر تعديل بواسطة apitos في 13-03-2010 الساعة 12:51 PM.
apitos is offline   قديم 13-03-2010, 12:44 PM
الرد مع إقتباس
عضو نشيط
#6  

أخي هل تظهر المشكلة على كل المتصفحات و ان لم يكن فعلى أيها تظهر

هل يمكن تعطيني رابط الخبر الفعلي الذي تظهر به هذه الرموز

السبب أخي أني لم أستطع اعادة صناعة الخطأ على جهازي فكل شيئ يظهر بشكل طبيعي

شكرا لك






__________________
http://servarica.com
Xen VPS and WHMCS Xen Management Addon modules
support@servarica.com
idontknow is offline   قديم 13-03-2010, 01:15 PM
الرد مع إقتباس
عضو نشيط جدا
#7  

رفعت الخبر الى موقعي وها هو الرابط :

http://tiaret.webege.com/news.php?action=view&id=25

الاخطاء عندي على كلا المتصفحين الاكسبلورر 7 والفايرفوكس.






__________________
مجلتي الصغيرة
apitos is offline   قديم 13-03-2010, 03:22 PM
الرد مع إقتباس
عضو نشيط
#8  

أخي
غير ال function make safe الى هذه
كود PHP:
//---------------------------------------------------
//------    replace  and clan  functions    ------//
//---------------------------------------------------
    
function makeSafe($Str)
    {
        
$Str preg_replace"#(\?|&amp;|&)(PHPSESSID|s|S)=([0-9a-zA-Z]){32}#e"""$Str );
        
$Str str_replace(array("&amp;","&lt;","&gt;"),array("&amp;amp;","&amp;lt;","&amp;gt;",),$Str);
        
$Str preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*expression[\x00-\x20]*\([^>]*>#iU',"$1>",$Str);
        
$Str preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*behaviour[\x00-\x20]*\([^>]*>#iU',"$1>",$Str);
        if(
version_compare(phpversion(),"5.0.0""<")){
        
$Str preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*>#iUu',"$1>",$Str);
        
$Str preg_replace('#(&\#*\w+)[\x00-\x20]+;#u',"$1;",$Str);
        
$Str preg_replace('#(&\#x*)([0-9A-F]+);*#iu',"$1$2;",$Str);
        
$Str preg_replace('#(<[^>]+[\x00-\x20\"\'])(on|xmlns)[^>]*>#iUu',"$1>",$Str);
        
$Str preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*)[\\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu','$1=$2nojavascript...',$Str);
        
$Str preg_replace('#([a-z]*)[\x00-\x20]*=([\'\"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu','$1=$2novbscript...',$Str);
        }
        
$Str preg_replace('#</*\w+:\w[^>]*>#i',"",$Str);
        do {
            
$oldstring $Str;
            
$string preg_replace('#</*(applet|meta|xml|blink|link|style|script|embed|object|iframe|frame|frameset|ilayer|layer|bgsound|title|base)[^>]*>#i',"",$Str);
        } while (
$oldstring != $Str);
    
$Str =preg_replace('#\&amp\;\#8236#'';#8236'$Str);
        return 
$Str
}

لو تلاحظ فان كل ما فعلته هو اضافة هذا السطر في النهاية
كود PHP:
    $Str =preg_replace('#\&amp\;\#8236#'';#8236'$Str); 
أعتقد أن المشكلة كانت في هذا السطر
كود PHP:
$Str preg_replace('#(&\#*\w+)[\x00-\x20]+;#u',"$1;",$Str); 
و لكن الظاهر أنه للحماية من ال XSS لذلك نتركه و نزيل أثره السلبي فقط
بعدها قم بحذف الخبر ثم ادخله من جديد و لنرى النتيجة

في حفظ الله






__________________
http://servarica.com
Xen VPS and WHMCS Xen Management Addon modules
support@servarica.com
idontknow is offline   قديم 13-03-2010, 04:16 PM
الرد مع إقتباس
عضو نشيط جدا
#9  

ولكن حسب المثال الذي فوق هناك الحروف الخاصة التالية :

#8236 - #8237 - #35

يعني بصورة عامة كيف ستكتب الدالة preg_replace لمعالجة جميع الحروف الخاصة المشابهة ؟

شكراً.






__________________
مجلتي الصغيرة
apitos is offline   قديم 13-03-2010, 09:55 PM
الرد مع إقتباس
عضو نشيط
#10  

الدالة التي ستعالج كل الحالات مرة واحدة هي
هذه الدالة ستعالج كل الحالات مثل
#12
#123
#1234

كود PHP:
       $Str =preg_replace('#\&amp\;\#(\d{2,4})#'';#$1'$Str); 
و لكني أفضل أن يتم معالجة الحالات الشاذة كل على حدة
يعني من الأفضل أن تضع 3 أوامر كالاتي
$
كود PHP:
Str =preg_replace('#\&amp\;\#8236#'';#8236'$Str);
    
$Str =preg_replace('#\&amp\;\#8237#'';#8237'$Str);
    
$Str =preg_replace('#\&amp\;\#35#'';#35'$Str); 
طبعا ازل الدالة الاضافية التي كتبناها سابقا و ضع بدالها اما الدالة العامة الأولى أو ال 3 دوال الاحقة
في حفظ الله






__________________
http://servarica.com
Xen VPS and WHMCS Xen Management Addon modules
support@servarica.com

آخر تعديل بواسطة idontknow في 13-03-2010 الساعة 11:08 PM.
idontknow is offline   قديم 13-03-2010, 10:15 PM
الرد مع إقتباس
عضو نشيط جدا
#11  

أضفتها في آخر الدالة ولكن عند ارسال الخبر من جديد واستعراضه يقيت تلك الحروف الخاصة تشوه الخبر.

لا ادري ما المشكلة ؟

حتى اني استعملت حلا آخر :

كود PHP:
$Str str_replace(array("&# 8236;","&# 8237;"),"",$Str); 
ولكن لم يجدي نفعاً.

راس ونص الخبر يتم معالجتهما قبل ارسالهما الى القاعدة هكذا :

كود PHP:
$news_head $apt->format_post($post_head);
$post $apt->format_post($post); 
والدالة makeSafe مستعملة في الدالة format_post والكود موجود فوق في هذه الصفحة.

ومع ذلك لا يتم حذف او التعامل مع هذه الحروف ...

اين المشكل في رايكم ؟






__________________
مجلتي الصغيرة

آخر تعديل بواسطة apitos في 14-03-2010 الساعة 01:48 AM.
apitos is offline   قديم 14-03-2010, 01:42 AM
الرد مع إقتباس
عضو نشيط
#12  

حسنا أخي لنعمل على عزل المشكلة

أولا قم بعمل comment out لكل الدالات التي لديك و حول كل دالة الى الشكل التالي
كود PHP:
//------------------------------------------------------
// معالجة البينات قبل ارسالها الى قاعدة البينات       //
//------------------------------------------------------
    
function format_data($Str)
    {
        
//$Str = $this->makeSafe($this->escapeStr(stripslashes($Str)));
        //return $this->add_slashes(strip_tags($Str));
return $Str;
    }
//------------------------------------------------------
//         معالجة النصوص اذا لم يستخدم محرر اتش تي ام ال
//------------------------------------------------------
    
function format_post($Str)
    {
        
//$Str = $this->makeSafe($this->escapeStr(stripslashes($Str)));
        //return $this->add_slashes(htmlspecialchars(trim($Str)));
return $Str;
    }
//------------------------------------------------------
//  معالجة النصوص مع استخدام محرر اتش تي ام ال         /
//------------------------------------------------------
    
function format_html_post($Str)
    {
        
/*$Str = $this->makeSafe($Str);
        if($this->getsettings("html_tags"))
        {
            $Str = strip_tags($Str,$this->getsettings("html_tags"));
        }
        return $this->add_slashes(trim($Str));*/
return $Str;
    }
//------------------------------------------------------
// معالجة البينات عند عرضها في المتصفح                //
//------------------------------------------------------
    
function format_data_out($Str)
    {
        
//$Str = preg_replace( "#(\?|&amp;|&)(PHPSESSID|s|S)=([0-9a-zA-Z]){32}#e", "", $Str );
        //return trim(nl2br(stripslashes($Str)));
    
return $Str;
    }  


//---------------------------------------------------
//------    replace  and clan  functions    ------//
//---------------------------------------------------
    
function makeSafe($Str)
    {
    
/*       
     $Str = preg_replace( "#(\?|&amp;|&)(PHPSESSID|s|S)=([0-9a-zA-Z]){32}#e", "", $Str );
        $Str = str_replace(array("&amp;","&lt;","&gt;"),array("&amp;amp;","&amp;lt;","&amp;gt;",),$Str);
        $Str = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*expression[\x00-\x20]*\([^>]*>#iU',"$1>",$Str);
        $Str = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*behaviour[\x00-\x20]*\([^>]*>#iU',"$1>",$Str);
        if(version_compare(phpversion(),"5.0.0", "<")){
        $Str = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*>#iUu',"$1>",$Str);
        $Str = preg_replace('#(&\#*\w+)[\x00-\x20]+;#u',"$1;",$Str);
        $Str = preg_replace('#(&\#x*)([0-9A-F]+);*#iu',"$1$2;",$Str);
        $Str = preg_replace('#(<[^>]+[\x00-\x20\"\'])(on|xmlns)[^>]*>#iUu',"$1>",$Str);
        $Str = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*)[\\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu','$1=$2nojavascript...',$Str);
        $Str = preg_replace('#([a-z]*)[\x00-\x20]*=([\'\"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu','$1=$2novbscript...',$Str);
        }
        $Str = preg_replace('#</*\w+:\w[^>]*>#i',"",$Str);
        do {
            $oldstring = $Str;
            $string = preg_replace('#</*(applet|meta|xml|blink|link|style|script|embed|object|iframe|frame|frameset|ilayer|layer|bgsound|title|base)[^>]*>#i',"",$Str);
        } while ($oldstring != $Str);
*/
        
return $Str;
    } 
و جرب اضافة الخبر

فان عمل
فابدأ بتشغيل الدالات واحدة واحدة حتى تعود المشكلة من جديد
الدالة التي عادت فيها المشكلة أبقها comment و الباقي شغلهم و تأكد أن المشكلة محصورة في هذه الدالة

الان بعد تحديد الدالة
ابدأ بالسماح بأجزاء من الدالة و ليس كلها
حتى تحدد بالضبط ما هو الأمر في الدالة المسؤول عن المشكلة
بعدها سنتمكن ان شاء الله من حل المشكلة

هذه الطريقة ستحتاج منك تقريبا 5 الى 6 تجارب لكن ان شاء الله يها يمكن تحديد المشكلة

في حفظ الله






__________________
http://servarica.com
Xen VPS and WHMCS Xen Management Addon modules
support@servarica.com
idontknow is offline   قديم 14-03-2010, 04:13 AM
الرد مع إقتباس
عضو نشيط جدا
#13  

اظن اني وضعت الكود في المكان الخاطيء ...

سوف اجرب من جديد.

كما ذكرت لك سابقا هناك العديد من الحروف الخاصة اسوقها لك في هذا الرابط :

http://www.whatsmyip.org/htmlcharacters/?full=yes

كما وجدت هاتان الدالتان ربما يمكن استعمالهما في معالجة جميع الحروف الخاصة :

كود PHP:
/* entity to unicode decimal value */
function entity_to_decimal_value($string){
 static 
$entities_dec false;
 if (!
is_array($entities_dec)) {
  
$entities_named    = array("&nbsp;","&iexcl;","&cent;","&pound;","&curren;","&yen;","&brvbar;","&sect;","&uml;","&copy;","&ordf;","&laquo;","&not;","&shy;","&reg;","&macr;","&deg;","&plusmn;","&sup2;","&sup3;","&acute;","&micro;","&para;","&middot;","&cedil;","&sup1;","&ordm;","&raquo;","&frac14;","&frac12;","&frac34;","&iquest;","&Agrave;","&Aacute;","&Acirc;","&Atilde;","&Auml;","&Aring;","&AElig;","&Ccedil;","&Egrave;","&Eacute;","&Ecirc;","&Euml;","&Igrave;","&Iacute;","&Icirc;","&Iuml;","&ETH;","&Ntilde;","&Ograve;","&Oacute;","&Ocirc;","&Otilde;","&Ouml;","&times;","&Oslash;","&Ugrave;","&Uacute;","&Ucirc;","&Uuml;","&Yacute;","&THORN;","&szlig;","&agrave;","&aacute;","&acirc;","&atilde;","&auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&ouml;","&divide;","&oslash;","&ugrave;","&uacute;","&ucirc;","&uuml;","&yacute;","&thorn;","&yuml;","&fnof;","&Alpha;","&Beta;","&Gamma;","&Delta;","&Epsilon;","&Zeta;","&Eta;","&Theta;","&Iota;","&Kappa;","&Lambda;","&Mu;","&Nu;","&Xi;","&Omicron;","&Pi;","&Rho;","&Sigma;","&Tau;","&Upsilon;","&Phi;","&Chi;","&Psi;","&Omega;","&alpha;","&beta;","&gamma;","&delta;","&epsilon;","&zeta;","&eta;","&theta;","&iota;","&kappa;","&lambda;","&mu;","&nu;","&xi;","&omicron;","&pi;","&rho;","&sigmaf;","&sigma;","&tau;","&upsilon;","&phi;","&chi;","&psi;","&omega;","&thetasym;","&upsih;","&piv;","&bull;","&hellip;","&prime;","&Prime;","&oline;","&frasl;","&weierp;","&image;","&real;","&trade;","&alefsym;","&larr;","&uarr;","&rarr;","&darr;","&harr;","&crarr;","&lArr;","&uArr;","&rArr;","&dArr;","&hArr;","&forall;","&part;","&exist;","&empty;","&nabla;","&isin;","&notin;","&ni;","&prod;","&sum;","&minus;","&lowast;","&radic;","&prop;","&infin;","&ang;","&and;","&or;","&cap;","&cup;","&int;","&there4;","&sim;","&cong;","&asymp;","&ne;","&equiv;","&le;","&ge;","&sub;","&sup;","&nsub;","&sube;","&supe;","&oplus;","&otimes;","&perp;","&sdot;","&lceil;","&rceil;","&lfloor;","&rfloor;","&lang;","&rang;","&loz;","&spades;","&clubs;","&hearts;","&diams;","&quot;","&amp;","&lt;","&gt;","&OElig;","&oelig;","&Scaron;","&scaron;","&Yuml;","&circ;","&tilde;","&ensp;","&emsp;","&thinsp;","&zwnj;","&zwj;","&lrm;","&rlm;","&ndash;","&mdash;","&lsquo;","&rsquo;","&sbquo;","&ldquo;","&rdquo;","&bdquo;","&dagger;","&Dagger;","&permil;","&lsaquo;","&rsaquo;","&euro;","&apos;");
  
$entities_decimal  = array("&# 160;","&# 161;","&# 162;","&# 163;","&# 164;","&# 165;","&# 166;","&# 167;","&# 168;","&# 169;","&# 170;","&# 171;","&# 172;","&# 173;","&# 174;","&# 175;","&# 176;","&# 177;","&# 178;","&# 179;","&# 180;","&# 181;","&# 182;","&# 183;","&# 184;","&# 185;","&# 186;","&# 187;","&# 188;","&# 189;","&# 190;","&# 191;","&# 192;","&# 193;","&# 194;","&# 195;","&# 196;","&# 197;","&# 198;","&# 199;","&# 200;","&# 201;","&# 202;","&# 203;","&# 204;","&# 205;","&# 206;","&# 207;","&# 208;","&# 209;","&# 210;","&# 211;","&# 212;","&# 213;","&# 214;","&# 215;","&# 216;","&# 217;","&# 218;","&# 219;","&# 220;","&# 221;","&# 222;","&# 223;","&# 224;","&# 225;","&# 226;","&# 227;","&# 228;","&# 229;","&# 230;","&# 231;","&# 232;","&# 233;","&# 234;","&# 235;","&# 236;","&# 237;","&# 238;","&# 239;","&# 240;","&# 241;","&# 242;","&# 243;","&# 244;","&# 245;","&# 246;","&# 247;","&# 248;","&# 249;","&# 250;","&# 251;","&# 252;","&# 253;","&# 254;","&# 255;","&# 402;","&# 913;","&# 914;","&# 915;","&# 916;","&# 917;","&# 918;","&# 919;","&# 920;","&# 921;","&# 922;","&# 923;","&# 924;","&# 925;","&# 926;","&# 927;","&# 928;","&# 929;","&# 931;","&# 932;","&# 933;","&# 934;","&# 935;","&# 936;","&# 937;","&# 945;","&# 946;","&# 947;","&# 948;","&# 949;","&# 950;","&# 951;","&# 952;","&# 953;","&# 954;","&# 955;","&# 956;","&# 957;","&# 958;","&# 959;","&# 960;","&# 961;","&# 962;","&# 963;","&# 964;","&# 965;","&# 966;","&# 967;","&# 968;","&# 969;","&# 977;","&# 978;","&# 982;","&# 8226;","&# 8230;","&# 8242;","&# 8243;","&# 8254;","&# 8260;","&# 8472;","&# 8465;","&# 8476;","&# 8482;","&# 8501;","&# 8592;","&# 8593;","&# 8594;","&# 8595;","&# 8596;","&# 8629;","&# 8656;","&# 8657;","&# 8658;","&# 8659;","&# 8660;","&# 8704;","&# 8706;","&# 8707;","&# 8709;","&# 8711;","&# 8712;","&# 8713;","&# 8715;","&# 8719;","&# 8721;","&# 8722;","&# 8727;","&# 8730;","&# 8733;","&# 8734;","&# 8736;","&# 8743;","&# 8744;","&# 8745;","&# 8746;","&# 8747;","&# 8756;","&# 8764;","&# 8773;","&# 8776;","&# 8800;","&# 8801;","&# 8804;","&# 8805;","&# 8834;","&# 8835;","&# 8836;","&# 8838;","&# 8839;","&# 8853;","&# 8855;","&# 8869;","&# 8901;","&# 8968;","&# 8969;","&# 8970;","&# 8971;","&# 9001;","&# 9002;","&# 9674;","&# 9824;","&# 9827;","&# 9829;","&# 9830;","&# 34;","&# 38;","&# 60;","&# 62;","&# 338;","&# 339;","&# 352;","&# 353;","&# 376;","&# 710;","&# 732;","&# 8194;","&# 8195;","&# 8201;","&# 8204;","&# 8205;","&# 8206;","&# 8207;","&# 8211;","&# 8212;","&# 8216;","&# 8217;","&# 8218;","&# 8220;","&# 8221;","&# 8222;","&# 8224;","&# 8225;","&# 8240;","&# 8249;","&# 8250;","&# 8364;","&# 39;");
  if (
function_exists('array_combine')) 
   
$entities_dec=array_combine($entities_named,$entities_decimal);
  else {
   
$i=0;
   foreach (
$entities_named as $_entities_named$entities_dec[$_entities_named]=$entities_decimal[$i++];
  }
 }
 return 
preg_replace"/&[A-Za-z]+;/"" "strtr($string,$entities_dec) );
}
function 
encode_xml($data){
 
// line breaks
 
$data=str_replace('<br(.*?)>',"\n",$data);
 
// ending html tags into line breaks
 
$data=preg_replace("/<\/(pre|ul|li|p|table|tr)>/","\n",$data);
 
// remove other html tags
 
$data=preg_replace("/<(.*?)>/","",$data);
 
// remove multiple newlines
 
$data=preg_replace("/\n\n+/","\n\n",$data);
 return 
entity_to_decimal_value($data);







__________________
مجلتي الصغيرة

آخر تعديل بواسطة apitos في 15-03-2010 الساعة 02:30 AM.
apitos is offline   قديم 15-03-2010, 02:25 AM
الرد مع إقتباس
الرد على الموضوع


 

أدوات الموضوع

قوانين المشاركات
لا يمكنك كتابة مواضيع جديدة
لا يمكنك إضافة ردود
لا يمكنك إرسال مرفقات
لا يمكنك تعديل مشاركاتك

كود vB متاح
كود [IMG] متاح
كود HTML غير متاح
Trackbacks are متاح
Pingbacks are متاح
Refbacks are متاح


المواضيع المشابهه
الموضوع كاتب الموضوع القسم الردود آخر مشاركة
كيفية كتابة الحروف العربية عبر .htaccess البـ أحمد ـرنس PHP 7 02-08-2009 09:58 PM
.htaccess كيفية إعادة كتابة الحروف البـ أحمد ـرنس تقنية محركات البحث Search Engine Optimization 5 17-06-2009 05:44 PM
جوجل تحاكي يملي و تنتج نسختها الخاصة لتحويل الحروف اللاتينية الى العربية Mercedes الويب والويب 2.0 والـ Semantic Web 6 25-10-2008 05:38 PM
مطلوب مصمم يجيد التعامل مع البرمجة الخاصة شبكة السعودية عروض البيع وطلبات الشراء في البرمجة والتصميم وبناء المحتوى وتبادل الاعلانات 1 03-11-2007 12:13 AM
عاجل جدا ... كيفية فرز الكلمات حسب الحروف الأبدجيه في الفرونت بيج بن خلفان الويب والويب 2.0 والـ Semantic Web 0 19-03-2004 04:22 AM


جميع الأوقات بتوقيت غرينتش +3. الوقت الآن هو 05:18 AM.