We are just about to try and get this working with sockets ourselves. Our
intranet currently does exactly what you are trying to do, but without using
sockets.

In reply to your question, there is no one site for XMLRPC really. I suggest
you read up on the following subjects:

XMLRPC document specification:
http://www.xmlrpc.com/spec

Flash XML object:
http://www.macromedia.com/devnet/mx/flash/articles/tools_xmlobject.html

PHP XMLRPC implementation:
http://us3.php.net/manual/en/ref.xmlrpc.php

Using XMLRPC instead of the previously mentioned methods of loading the PHP
output as a text file has the following benefits:

1. Complete freedom to communicate a complex data structure, including
multidimensional arrays. This is difficult if not impossible to do with
simple PHP text output.
2. Data types are kept intact when being transferred. E.g. there is no
confusion as to whether:

        1 = integer: 1
        1 = string: 1
        1 = Boolean: true

3. XMLRPC is an industry standard. Using it will allow other developers to
easily build clients for your server side script should you wish.
4. PHP has full XMLRPC functionality built in; Flash has XML functionality
built in. There is a little extra work involved in extending the Flash XML
object to an XMLRPC parser (or you could try one of the OpenSource
alternatives), but I recommend building one yourself if you have the time,
it really helps you understand XML.

-----Original Message-----
From: Eric Bolikowski [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 20, 2004 4:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Flash-PHP Socket Connection

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" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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:
> >
> >> Hi 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
to
> >> make 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to