I have a php file, when you open it, a picture is going to be downloaded and opened. Here is my code:
header('Content-type: image/jpeg');
$stream = fopen('php://output', 'w'); // Stream to browser like with echo
$MadelineProto->download_to_stream($messageMediaPhoto, $stream);
It's ok when you open directly. But when I send an ajax request to the page, I get some long strange characters. (I want to display the image in html src
)
any idea would be appreciated.