http - PHP Photo incorrect format -


i'm trying upload photo using php http post i'm getting following error:

warning: imagecreatefromstring(): gd-jpeg: jpeg library reports unrecoverable error: in /home/randomma/public_html/randommash/web service/main.php on line 205

warning: imagecreatefromstring(): passed data not in 'jpeg' format in /home/randomma/public_html/randommash/web service/main.php on line 205

warning: imagecreatefromstring(): couldn't create gd image stream out of data in /home/randomma/public_html/randommash/web service/main.php on line 205

warning: imagejpeg() expects parameter 1 resource, boolean given in /home/randomma/public_html/randommash/web service/main.php on line 205

here code using try save file:

imagejpeg(imagecreatefromstring(base64_decode($_post["img"], true)), "/users/images/20/".md5(uniqid()).".png"); 


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -