RE: [PHP] Re: Flash-PHP Socket Connection

2004-01-21 Thread Donald Tyler
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



RE: [PHP] Re: Flash-PHP Socket Connection

2004-01-21 Thread Donald Tyler
You would use sockets if you were developing a client/server application
that was making a LOT of requests very quickly.

Opening and closing connections using normal HTTP methods gets slow when
carrying out such intense data communication.

A good example would be an online game where you need to constantly know the
location of all players all the time.

-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 20, 2004 7:55 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Flash-PHP Socket Connection

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 [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

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



Re: [PHP] Re: Flash-PHP Socket Connection

2004-01-21 Thread Jon Bennett
You would use sockets if you were developing a client/server 
application
that was making a LOT of requests very quickly.

Opening and closing connections using normal HTTP methods gets slow 
when
carrying out such intense data communication.

A good example would be an online game where you need to constantly 
know the
location of all players all the time.


But unless that's the case then there's no need to use sockets, just 
output xml via php/mysql and send that to flash.

Or, if you're ok writing OOP php, then check out amf to php, you can 
then use flash remoting.

http://amfphp.org/

Good luck,

Jon

jon bennett  |  [EMAIL PROTECTED]
new media creative
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
J   b   e   n   .   n   e   t

91 Gloucester Rd,  Trowbridge,  Wilts,  BA14 0AD
t: +44 (0) 1225 341039 w: http://www.jben.net/
On 21 Jan 2004, at 13:52, Donald Tyler wrote:

You would use sockets if you were developing a client/server 
application
that was making a LOT of requests very quickly.

Opening and closing connections using normal HTTP methods gets slow 
when
carrying out such intense data communication.

A good example would be an online game where you need to constantly 
know the
location of all players all the time.

-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 7:55 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Flash-PHP Socket Connection
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 [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
--
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


Re: [PHP] Re: Flash-PHP Socket Connection

2004-01-21 Thread Jon Bennett
you might want to check out http://www.flash-remoting.com/ as well. 
There's also a book from oreilly.

Cheers,

Jon

jon bennett  |  [EMAIL PROTECTED]
new media creative
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
J   b   e   n   .   n   e   t

91 Gloucester Rd,  Trowbridge,  Wilts,  BA14 0AD
t: +44 (0) 1225 341039 w: http://www.jben.net/
On 21 Jan 2004, at 14:40, Jon Bennett wrote:

You would use sockets if you were developing a client/server 
application
that was making a LOT of requests very quickly.

Opening and closing connections using normal HTTP methods gets slow 
when
carrying out such intense data communication.

A good example would be an online game where you need to constantly 
know the
location of all players all the time.


But unless that's the case then there's no need to use sockets, just 
output xml via php/mysql and send that to flash.

Or, if you're ok writing OOP php, then check out amf to php, you can 
then use flash remoting.

http://amfphp.org/

Good luck,

Jon

jon bennett  |  [EMAIL PROTECTED]
new media creative
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
J   b   e   n   .   n   e   t

91 Gloucester Rd,  Trowbridge,  Wilts,  BA14 0AD
t: +44 (0) 1225 341039 w: http://www.jben.net/
On 21 Jan 2004, at 13:52, Donald Tyler wrote:

You would use sockets if you were developing a client/server 
application
that was making a LOT of requests very quickly.

Opening and closing connections using normal HTTP methods gets slow 
when
carrying out such intense data communication.

A good example would be an online game where you need to constantly 
know the
location of all players all the time.

-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 7:55 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Flash-PHP Socket Connection
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 [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
--
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

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


[PHP] Re: Flash-PHP Socket Connection

2004-01-21 Thread Eric Bolikowski
Hi everybody helping me on this

I have not gotten a lot of tips, I appreciate all the help I have gotten
here.

I have decided to try out different technologies that I have been advised
and measure performance to choose the best and fastest one!

Eric

Eric Bolikowski [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 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] Re: Flash-PHP Socket Connection

2004-01-20 Thread Ben Ramsey
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] Re: Flash-PHP Socket Connection

2004-01-20 Thread Ben Ramsey
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] Re: Flash-PHP Socket Connection

2004-01-20 Thread Eric Bolikowski
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] Re: Flash-PHP Socket Connection

2004-01-20 Thread Ben Ramsey
I guess that's good enough reason for me.  As far as connecting with 
sockets, though: you should connect from Flash to the PHP file, not from 
PHP to the Flash file, I think.  And, in order to do that, you would 
need to ask some people who specialize in Flash and ActionScript, so the 
boards at Macromedia.com may be the best place to ask.

Then again, I could be absolutely wrong. ;-)

-Ben

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 [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] Re: Flash-PHP Socket Connection

2004-01-20 Thread Marc Greenstock
I am doing the same thing at the moment,

I'm building a Flash/PHP/MySQL chat system capable of handling over 1000
users online at one time.

GET and POST just doesn't cut it, so I began to explore other avenues, and
XML Socket's seem like the best and only option. But I expect to burn the
midnight oil on this one.

Marc

Ben Ramsey [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I guess that's good enough reason for me.  As far as connecting with
 sockets, though: you should connect from Flash to the PHP file, not from
 PHP to the Flash file, I think.  And, in order to do that, you would
 need to ask some people who specialize in Flash and ActionScript, so the
 boards at Macromedia.com may be the best place to ask.

 Then again, I could be absolutely wrong. ;-)

 -Ben


 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 [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



Re: [PHP] Re: Flash-PHP Socket Connection

2004-01-20 Thread daniel
check out http://www.php.net/manual/en/ref.ircg.php

and

http://www.schumann.cx/ircg/


 I am doing the same thing at the moment,

 I'm building a Flash/PHP/MySQL chat system capable of handling over
 1000 users online at one time.

 GET and POST just doesn't cut it, so I began to explore other avenues,
 and XML Socket's seem like the best and only option. But I expect to
 burn the midnight oil on this one.

 Marc

 Ben Ramsey [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 I guess that's good enough reason for me.  As far as connecting with
 sockets, though: you should connect from Flash to the PHP file, not
 from PHP to the Flash file, I think.  And, in order to do that, you
 would need to ask some people who specialize in Flash and
 ActionScript, so the boards at Macromedia.com may be the best place to
 ask.

 Then again, I could be absolutely wrong. ;-)

 -Ben


 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 [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



Re: [PHP] Re: Flash-PHP Socket Connection

2004-01-20 Thread Miles Thompson
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 [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


[PHP] Re: flash - php

2002-10-05 Thread Joseph Szobody

Couple good places to start...

http://www.phpbuilder.com/columns/hill20011214.php3
http://www.macromedia.com/desdev/mx/flash/articles/flashmx_php.html

Joseph

Zeljko Bozic [EMAIL PROTECTED] wrote in message 
001b01c26ca2$cc79c7b0$b3411ad9@stuntssw9fdkdl">news:001b01c26ca2$cc79c7b0$b3411ad9@stuntssw9fdkdl...
 I'm new to php.
 want to build swf appl. with sql support
 need some example (source)
 
 
 please help
 


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