Skip to content

Instantly share code, notes, and snippets.

@t-cyrill
Created July 30, 2013 01:50
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save t-cyrill/6109550 to your computer and use it in GitHub Desktop.
Save t-cyrill/6109550 to your computer and use it in GitHub Desktop.
Define getimagesizefromstring to use in PHP 5.3
<?php
if (!function_exists('getimagesizefromstring')) {
function getimagesizefromstring($data)
{
$uri = 'data://application/octet-stream;base64,' . base64_encode($data);
return getimagesize($uri);
}
}
@argaios
Copy link

argaios commented Aug 27, 2015

thanks!!!

@kaizendeveloper
Copy link

Awesome! It works! Thanks!

@CharlieBrownCharacter
Copy link

Thank you for that <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment