Re: PHP talk to a running Java program on a Linux platform..?
| From: | Rob Curts | Date: | Tue, 18 Jul 2000 14:51:47 +0000 |
| Subject: | Re: PHP talk to a running Java program on a Linux platform..? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7077@lists.php.net to get a copy of this message | ||
on 7/18/00 10:33 AM, Christian Calloway at cubadc@mail.earthlink.net wrote:
> Hey everyone,
>
> I've run into a bit of a programming quandry, and need some advise on how I
> should proceed. I have a java server program running on the server which
> acts as a countdown clock, it counts from N time to 0 (it does some other
> stuff too, but thats not important). This program acts as a server, in that
> everytime a socket connection is made to the port its monitoring, it will
> return the amount of time left to the client, and close the connection. In
> my case, I want to show the amount of time remaining in my browser, so I
> have a php script handle opening up a client socket to the server program,
> and storing all the necessary information, and then returning that to my
> browser. It works fine, but to me it seems to make little sence to have a
> php script, which is physically sitting right next to my Java program on the
> server, to go through the work of establishing a client-socket session. Is
> there another more efficient and senseable way to have my PHP script talk to
> a background running Java program?Thanks everyone,
>
> Christian Calloway
>
>
have you tried opening a port to 127.0.0.1? I have done that from perl
scripts to java port listeners and it worked fine. it's a bit faster as
well.
that's a really cool idea, btw