Answer the question
In order to leave comments, you need to log in
Why doesn't PHP imagecreatefromstring() recognize string?
You need to get a picture from the site. The site returns it in the form of base64Binary (using the API of this site). A string
comes in, I decode it with $data = base64_decode($string); and I can display in the browser like this:
echo '<img src="data:image/jpeg;base64,'.$data.'">';
$im = imagecreatefromstring($data);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question