View Single Post
ישן 29-11-08, 23:27   # 24
intercooler3819
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: Jul 2008
הודעות: 1,056

intercooler3819 לא מחובר  

הקוד שלך קצת מוזר לי בכל מקרה הנה
PHP קוד:
function checkBase64Encoded ($encodedString)
{
    
$length strlen($encodedString); 

    for (
$i 0$i $length; ++$i)  
    { 
        
$c $encodedString[$i]; 
        if ( 
        (
$c '0' || $c '9'
        && (
$c 'a' || $c 'z'
        && (
$c 'A' || $c 'Z'
        && (
$c != '+'
        && (
$c != '/'
        && (
$c != '='
        ) { 
            return 
false
        } 
    } 

     if (
base64_decode($encodedString) === FALSE)
     {
          return 
false;
     }
     else if (
base64_encode(base64_decode($encodedString)) !== $encodedString)
     {
          return 
false;
     }

     return 
true;

לא בדקתי
תתפנק
__________________
  Reply With Quote