Re: Re: Flash-PHP Socket Connection
| From: | Miles Thompson | Date: | Wed, 21 Jan 2004 01:55:22 +0000 |
| Subject: | Re: Re: Flash-PHP Socket Connection | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175259@lists.php.net to get a copy of this message | ||
Use xmlReceiver to trigger the back end PHP script. Have that script generate XML which you parse in Flash. Plain text will work, but a single quotation mark in the text sends you off to never never land. Here's an example:
xmlReceiver.load( "http://" + host + "feed_xml_article.php");
I know it's not a socket, but it's plenty fast.
Regards - Miles Thompson
PS What good would a socket to PHP do, anyway? (I probably just revealed my ignorance!) /mt
At 11:03 PM 1/20/2004 +0100, Eric Bolikowski wrote:
Hey Ben I know it may sound nuts, but I really want to make a socket connection between a Flash and a PHP file. Normally I would simply read in a text file/read XML/send data with GET or POST, but I'm looking for a socket connections of following reasons: 1) I want a fast connection 2) I'm looking at this as a challenge, because it doesn't seem like anyone else has done this before Eric "Ben Ramsey" <br@benandliz.com> wrote in message news:400DA2E2.1010606@benandliz.com... What I mean is: you shouldn't need to use sockets to read in a file from Flash unless you're trying to do something more complicated, but from the way it sounds, you just want to pull data from MySQL with a PHP script and output it to Flash. The PHP script could just echo plain text and Flash can read that in just fine without needing to connect via a socket. -Ben Ben Ramsey wrote:Flash has the ability to read in text files, so you could use PHP to output data in the correct format and use Flash to read the PHP script like it reads a text file. We did this in ASP once upon a time. Here's a tutorial about reading text files into Flash: http://www.virtual-fx.net/tutorials/html/loadtextfile.htm Also, from what I understand, Flash now has a great XML parser, so you could use PHP to generate XML and Flash could read in the XML as variables. You might want to look into that, but I think it's only available in the newest version. -Ben Eric Bolikowski wrote:toHi everybody I'm working on a site that will be based on Flash, PHP and MySQL. PHP will work as a middleware for Flash and MySQL. My problem is communication between Flash and PHP. I'm really out looking for using the socket functions in PHP and Flash-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpmake fast connection. I have googled for almost an hour now, and I can't seem to find any interesting. The only info I find, is about sending data between Flash and PHP with HTTP GET or HTTP POST. So if anybody has some general information on this or a link to a tutorial on the subject, I would like to get those resources. Thanks a lot Eric