jonty Posted June 8, 2008 Share Posted June 8, 2008 Hi, imagegif() either outputs an image resource to the screen, or writes it to a gif file if a filename is passed. I however wish to get it's output into a string, without having to wastelessly write the file and read it back in. Anyway of capturing standard output? Link to comment https://forums.phpfreaks.com/topic/109240-solved-capturing-php-output/ Share on other sites More sharing options...
448191 Posted June 8, 2008 Share Posted June 8, 2008 You can use ob_start() and ob_get_contents(), OR you can try if it will accept the php://memory stream wrapper as filename. Link to comment https://forums.phpfreaks.com/topic/109240-solved-capturing-php-output/#findComment-560350 Share on other sites More sharing options...
jonty Posted June 8, 2008 Author Share Posted June 8, 2008 Ah cool - thanks. I never would have tracked that down. I coudn't find good documentation on the memory wrapper, but the ob_start method worked fine. Thanks again. Link to comment https://forums.phpfreaks.com/topic/109240-solved-capturing-php-output/#findComment-560534 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.