You are here: Re: sending JPG bytes to a PHP script via POST? « PHP Programming Language « IT news, forums, messages
Re: sending JPG bytes to a PHP script via POST?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация