|
Posted by joshuajnoble on 11/13/07 03:36
On Nov 12, 11:47 pm, NC <n...@iname.com> wrote:
> On Nov 12, 4:59 pm, joshuajnoble <joshuajno...@gmail.com> wrote:
>
>
>
> > I'm working with a flash application that sends a small JPEG
> > as binary data over a post to a PHP script. I'd like the script
> > to be able to display that JPEG but I've tried imagecreatefromstring
> > without any luck and looked through the documentation without
> > much luck. The data getting sent to the PHP script is a valid
> > JPEG file, but I'm not sure what to do with it once it gets there.
>
> The issue here is that the PHP script that generates an image
> dynamically cannot generate HTML and vice versa. I would guess that
> the script that receives data from the Flash application generates
> some HTML, so it cannot generate the image. You need to do one of the
> following:
>
> 1. Write the JPEG image to disk and generate HTML with <img> tag
> pointing to the newly created file.
>
> 2. Pass the JPEG image data to another script, which will render
> it as image. Given the relatively large chunk of data that
> needs to be passed, consider using a session variable.
>
> Cheers,
> NC
Ok, makes sense, thank you kindly for the advice.
J
Navigation:
[Reply to this message]
|