search
top

Encode Decode image using PHP

Hello, I am describing here the way to 1) Encode image to generate a string 2) Decode image from a given encoded string 1) Here you need to specifiy the path of your image in variable ‘$image_path’ <?php $image_path = 'test_image.gif'; //this will be the physical path of your image $img_binary = fread(fopen($image_path, "r"), filesize($image_path)); $img_str...
read more

Copy Directory

I am listing here the method to copy full Directories with all sub-directories and files. <?php $source = 'f1'; //folder name $target = 'f2'; //folder name , if target folder does not exists, it will be created //echo 'src->'.$source.'<br/>'; //echo 'tar->'.$target.'<br/>'; if(is_dir($source)) { full_copy($source,$target); echo 'Folder copied'; } else { echo 'Not copied'; } function...
read more

top