Lots of different ways...

   1. expose an API using Node.js for your PHP web app to call (e.g. build 
   a REST API around the GPS module)
   2. if node and PHP are on the same physical server, and it is a low use 
   (e.g. under 20 concurrent users) system, you could write a file in PHP and 
   have Node look (directory watch) for that file to read and execute whatever 
   commands are in the file.
   3. you could use a 3rd party cache, like ehCache, to store commands from 
   PHP and read (poll for) them from Node.
   4. you could also do that with a database (store record in PHP, read 
   (poll for) the record in Node.
   5. Ditch PHP altogether and build the webapp in Node.

That's just 4 off the top of my head :) If it were me, I'd build a REST API 
in Node and call it from PHP - it's the cleanest of the solutions if you're 
tied to PHP for your webapp. Otherwise, just write the webapp in Node as 
well.

HTH!

-- Denny

On Saturday, March 19, 2016 at 10:26:28 AM UTC-4, Amrit Kumar wrote:
>
> I am working on a GPS tracking system and have used node js module 
> available for gps tracking.  i would like to understand how i can call 
> method from my  web interface developed in Php to the node.js   server so 
> that  the node.js server can further send the command to the GPS device on 
> tcp . 
>
>
>
>
>
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/89b67daf-9d61-48e6-9075-b6f6c69aa1f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to