How to access a php file from microprocessor?
Posted: Mon Apr 04, 2011 2:02 am
Hello all
I have been trying to solve something all day and have no luck. I am writing some code for a microprocessor to connect to a php file I created and placed on a server. The wifi device I am writing the code for does not allow you to just type in the url as you would in a typical browser. It expects to first see the command OPEN, followed by the address and port you want to contact the server at.
Example:
The code above illustrates what the code is doing in the micro>wifi device, and returns "Connect to xx.xxx.xxx.xxx:80"
which is the correct IP of the server. Using a misspelled address will result in Bad address error. So I believe that the connection is being made. It is not allowed to add the php file to the address, as an error is received Bad Address.
What I need to understand is, that it seems like what first happens behind the scenes is that the wifi device makes an initial connection to the server at the port 80, then the server is expecting something else to produce a response. Does anyone know what the sequence of events would be and what the next code would be to get the php file to do it's work?
Thanks for any suggestions.
I have been trying to solve something all day and have no luck. I am writing some code for a microprocessor to connect to a php file I created and placed on a server. The wifi device I am writing the code for does not allow you to just type in the url as you would in a typical browser. It expects to first see the command OPEN, followed by the address and port you want to contact the server at.
Example:
Code: Select all
open somewebserver.com 80
returnwhich is the correct IP of the server. Using a misspelled address will result in Bad address error. So I believe that the connection is being made. It is not allowed to add the php file to the address, as an error is received Bad Address.
What I need to understand is, that it seems like what first happens behind the scenes is that the wifi device makes an initial connection to the server at the port 80, then the server is expecting something else to produce a response. Does anyone know what the sequence of events would be and what the next code would be to get the php file to do it's work?
Thanks for any suggestions.