Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #5054 > unrolled thread
| Started by | "sl@exabyte" <sb5309@hotmail.com> |
|---|---|
| First post | 2012-03-01 21:15 +0800 |
| Last post | 2012-03-02 00:09 +0800 |
| Articles | 5 — 5 participants |
Back to article view | Back to comp.lang.php
javascript, XmlHttpRequest, PHP, and daemon "sl@exabyte" <sb5309@hotmail.com> - 2012-03-01 21:15 +0800
Re: javascript, XmlHttpRequest, PHP, and daemon The Natural Philosopher <tnp@invalid.invalid> - 2012-03-01 14:05 +0000
Re: javascript, XmlHttpRequest, PHP, and daemon Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-03-01 15:28 +0100
Re: javascript, XmlHttpRequest, PHP, and daemon Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-01 09:05 -0500
Re: javascript, XmlHttpRequest, PHP, and daemon "SL" <sb5309@hotmail.com> - 2012-03-02 00:09 +0800
| From | "sl@exabyte" <sb5309@hotmail.com> |
|---|---|
| Date | 2012-03-01 21:15 +0800 |
| Subject | javascript, XmlHttpRequest, PHP, and daemon |
| Message-ID | <jinsps$io3$1@news.albasani.net> |
Rather than banging my head, I think I shall ask the experts first. From a web page, using javascript, there is no way to talk and listen to a daemon on linux ( I gathered from folks here). 1. Using javascript I can send data to a PHP file and wait for it reply (aka AJAX). 2. Assume that the PHP file is on the same server running the daemon. Question --------- Can I do this: I send my data to a PHP file via XmlHttpRequest; the PHP file communicates with the daemon and get its reply, after which the PHP will return the result to my javascript ? Thanks folks (forgive me if it is stupid).
[toc] | [next] | [standalone]
| From | The Natural Philosopher <tnp@invalid.invalid> |
|---|---|
| Date | 2012-03-01 14:05 +0000 |
| Message-ID | <jinvnf$nm2$1@news.albasani.net> |
| In reply to | #5054 |
sl@exabyte wrote: > Rather than banging my head, I think I shall ask the experts first. > > From a web page, using javascript, there is no way to talk and listen to a > daemon on linux ( I gathered from folks here). > There is. web sockets. > 1. Using javascript I can send data to a PHP file and wait for it reply (aka > AJAX). > yes. > 2. Assume that the PHP file is on the same server running the daemon. > > Question > --------- > > Can I do this: > > I send my data to a PHP file via XmlHttpRequest; the PHP file communicates > with the daemon and get its reply, after which the PHP will return the > result to my javascript ? > yes. > Thanks folks (forgive me if it is stupid). > > -- To people who know nothing, anything is possible. To people who know too much, it is a sad fact that they know how little is really possible - and how hard it is to achieve it.
[toc] | [prev] | [next] | [standalone]
| From | Erwin Moller <erwinmollerusenet@xs4all.nl> |
|---|---|
| Date | 2012-03-01 15:28 +0100 |
| Message-ID | <4f4f8771$0$6973$e4fe514c@news2.news.xs4all.nl> |
| In reply to | #5060 |
On 3/1/2012 3:05 PM, The Natural Philosopher wrote: > sl@exabyte wrote: >> Rather than banging my head, I think I shall ask the experts first. >> >> From a web page, using javascript, there is no way to talk and listen >> to a daemon on linux ( I gathered from folks here). >> > > There is. > > web sockets. Websocket? Too early to advice that. http://en.wikipedia.org/wiki/Web_socket#Browser_support Maybe in a few years, but now is too early. He can better implement the XHR approach if he wants it to work today. :-) Regards, Erwin Moller -- "That which can be asserted without evidence, can be dismissed without evidence." -- Christopher Hitchens
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2012-03-01 09:05 -0500 |
| Message-ID | <jinvnp$3p5$1@dont-email.me> |
| In reply to | #5054 |
On 3/1/2012 8:15 AM, sl@exabyte wrote: > Rather than banging my head, I think I shall ask the experts first. > > From a web page, using javascript, there is no way to talk and listen to a > daemon on linux ( I gathered from folks here). > > 1. Using javascript I can send data to a PHP file and wait for it reply (aka > AJAX). > > 2. Assume that the PHP file is on the same server running the daemon. > > Question > --------- > > Can I do this: > > I send my data to a PHP file via XmlHttpRequest; the PHP file communicates > with the daemon and get its reply, after which the PHP will return the > result to my javascript ? > > Thanks folks (forgive me if it is stupid). > > How is the PHP script going to communicate with the daemon? Why are you beating your head against the wall trying to reinvent the wheel? -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | "SL" <sb5309@hotmail.com> |
|---|---|
| Date | 2012-03-02 00:09 +0800 |
| Message-ID | <jio70f$718$1@news.albasani.net> |
| In reply to | #5061 |
> How is the PHP script going to communicate with the daemon? Using socket in PHP, localhost, port number which the daemon is listening. Not possible on a web server ? > Why are you beating your head against the wall trying to reinvent the > wheel? Just cross my mind whether this is a possibility. Possibly a poor man's option.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web