Go Down

Topic: Access Arduino from PHP on an eternal website (Read 817 times) previous topic - next topic


I have an Arduino controlling my garage doors that communicates with an IOS app thru the internet.  It uses a dynamic DNS name all of which works fine.  What is not working is access to the Arduino thru a website.  I sm trying to set up monitoring of the device by accessing the URL.  If I enter the URL in my browser directly, I receive back status info as expected.  If I use cURL in a  PHP script, I do not get anything back.  Changing the URL to another website works as expected. Does anyone have any idea why this doesn't work?


Sounds like a networking issue. Are you forwarding all your packets properly? Is your browser client on the same network as your HTTP server running curl? Is it on the same network as your microcontroller? Where is the data stored for your IOS app?

As a general concept for overall architecture of systems in which microcontrollers are communicating with an external server, I would initiate all communication with the external server by the microcontroller. I know you have stated that you are running a server on the microcontroller, but things get a bit more complicated with your network when you don't have an environment setup to serve requests through your network like a hosting company has setup. It also makes for much cleaner API's creating all endpoints at one domain.
Throw a little karma my way. What goes around comes around.

Go Up