Go Down

Topic: Arduino + ethernet shield: read information from the database (Read 1 time) previous topic - next topic

VMwareUser

Hello,

How can I read information from the Internet from a database using arduino uno r3 + ethernet shield (w5100)?

I work with mySQL + PHP.
Be happy to see a simple example how you can take the information into a variable.

Thank you.

SurferTim

Quote
Be happy to see a simple example how you can take the information into a variable.


Me too, but there isn't a "simple" example. Do you have the PHP/MySQL server working correctly when you try the request with a web browser?

VMwareUser

#2
May 05, 2012, 03:51 pm Last Edit: May 05, 2012, 04:05 pm by VMwareUser Reason: 1
hi
yes, i have php + mySQL.
i have a php file return text "hello word", and i wont set this text to string variable.

Succeed to write information to a database via a link that contains querystring.
For example: http://192.168.1.1/writeDB.php?myText="hello word"

i can make a php file return a text string.

SurferTim

This is a malformed URL. Spaces are not allowed (between hello and word).
Quote
http://192.168.1.1/writeDB.php?myText="hello word"


If the server is returning a text response, which it should, then you must parse the data required in the Arduino from the response and convert it to a digital value. The good thing about HTML is web browsers will ignore any HTML tags they do not understand. You could send the data back in a tag. That should make it easier to find the data among the other stuff.
<myTag data=1234>

VMwareUser

Thanks for the answer,
How do I get the data to a variable?

Go Up