2
My case is the following: the microcontroller sends data using GET to the server, it saves it in the Mysql database and tests if it needs to trigger the alert. This alert is made with a PHP page that uses jQuery+Ajax to send to another server, this already works, however, it needs a browser to run the jQuery application because it is on the client side and is not possible with the microcontroller. I searched and saw that it would be the case to use Node.js to process this on the server side. Here’s the question: how I would run this PHP page for Node.js?
Why are you mixing Node and PHP? have to be or think the solution goes there?
– Sergio
In fact it is because this page is already working, is ready and the deadline is short. As I have no experience with Node.js, Alvéz would be less worse for now to make it "browser" to work jQuery functions on the PHP page.
– Bruno Macedo
I’m still lost..., do you have a server running with Nodejs or PHP? I don’t understand what you mean by
navegador
andmicrocontrolador
(Maybe they are terms that I am not used to in Portugal). If you have the page running in Nodejs put here the code you have and di what you need to do. Explains the functionality better to understand the whole problem.– Sergio
When I say browser, I mean a browser. The microcontroller I’m using is the Arduino with an Ethernet Shield W5100. The path is as follows: Arduino -> PHP server -> Mysql. But on the PHP server it will do some tests on the received data, if it enters the condition, IE, need to trigger the emergency command would be as follows: PHP server (using jQuery+Ajax) -> Another server. Arduino as Client does not run this page with jQuery, it would work if it ran on the server side with Nodejs, but it could run this PHP page?
– Bruno Macedo
I don’t think Nodejs is the right tool for what you want. If you explain your structure better (what runs in each place and what you want to result) maybe someone can help.
– Bacco
Looks like what you need is a headless browser, like http://phantomjs.org/. But I don’t know if you can run this on an Arduino, I would guess that it doesn’t work.
– bfavaretto
Bruno what do you mean by "PHP server (using jQuery+Ajax)"? Do you know that jQuery is a client-side library right? If you can join code you want to run, or this PHP page you want to run for the question get more concrete.
– Sergio
Vote today! Vote tomorrow! Vote always! Vote consciously! Your vote is very important to our community, contribute to us, and help make Stack Overflow in Portuguese (Sopt) bigger and bigger. You can learn more at: Vote early, vote often
– RodrigoBorth