You are here: Re: piping php-generated xml to flash « PHP SQL « IT news, forums, messages
Re: piping php-generated xml to flash

Posted by NC on 12/19/05 01:09

Henri wrote:
>
> I'm building a photo gallery using flash as a front-end to
> a mysql database. I use php to query the database.
> I was wondering if it was possible to generate xml into
> a stream that would be directly piped to flash.

Sounds doable...

> See, normally one would use php to write an xml file that
> would then be read by flash eg.
>
> xmlData = new XML();
> xmlData.load("query_results.xml")
>
> what I want is this: xmlData.load("query.php") where
> query.php would be something like
>
> echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>"
> echo "<images>";
> echo "<img_data>";
> echo "<val title=\"$title\"/>
> echo "<val path=\"$path\"/>
> echo "</img_data>
> echo "</images>

You might consider two things:

1. Add header('Content-type: text/xml') at the beginning
of your script.

2. Consider xmlData.load("http://localhost/query.php");
otherwise, PHP interpreter may not be called and Flash
will access the PHP source code, not the XML the
script is supposed to generate.

Cheers,
NC

 

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

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