Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php detect base64 encoding

function is_base64_encoded($data)
{
    if (preg_match('%^[a-zA-Z0-9/+]*={0,2}$%', $data)) {
       return TRUE;
    } else {
       return FALSE;
    }
};

is_base64_encoded("iash21iawhdj98UH3"); // true
is_base64_encoded("#iu3498r"); // false
is_base64_encoded("asiudfh9w=8uihf"); // false
is_base64_encoded("a398UIhnj43f/1!+sadfh3w84hduihhjw=="); // false
Comment

PREVIOUS NEXT
Code Example
Php :: Git delete single branch 
Php :: php salto de linea 
Php :: how to get time php with am/pm 
Php :: Message: Too few arguments to function Admin::tindakan_vaksin1(), 1 passed in C:xampphtdocsloginsystemcoreCodeIgniter.php on line 532 and exactly 2 expected 
Php :: composer deploy production 
Php :: how to display list of all pages in wordpress 
Php :: laravel query builder join 
Php :: create date from string php 
Php :: date 3 months ago for a particular date php 
Php :: get ip in laravel 
Php :: php.ini location mac 
Php :: laravel return list of ids 
Php :: php set array 
Php :: vue mouseover 
Php :: Carbon Format date with timezone in views Laravel 
Php :: wordpress get page slug 
Php :: laravel new project command 
Php :: Magento 2 -Limit the length of the product name on the front end. 
Php :: phpspreadsheet edit excel file 
Php :: php iterate through array 
Php :: array_map class method 
Php :: new line php 
Php :: php array to csv 
Php :: how to reverse fetch assoc in php 
Php :: php sort array by key 
Php :: How to insert time in table using CodeIgniter 
Php :: store as real file name laravel uplaod 
Php :: phpunit repeat 
Php :: php key value dictionary 
Php :: where laravel function 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =