Go Down

Topic: Retrieving HTTP GET data which has been sent remotely (Read 321 times) previous topic - next topic

ojdas

Hi guys,

I'm beginner of Arduino programming language and I'm looking for some tips how to resolve my problem.
I'm trying retrieving some data which is sending over by this URL
Code: [Select]
http://192.168.1.1?altitude=43.9&azimuth=199.5&maxtime=22:55&maxaltitude=45.5&maxazimuth=179
How to obtain some variables from above URL. eg. altitude or azimuth to get 43.9 or 199.5?
This data is variable not constant, in PHP is easy  ;) but how to write some code for Arduino?
Any help will be appreciated.

Regards,
Piotr

PeterH

You need to obtain the URL string from the HTTP request, extract the part of the string that contains the number, and parse that to get the numeric value.
I only provide help via the forum - please do not contact me for private consultancy.

PaulS

We can't see what code you have running on the Arduino. So, we can't tell if you are doing anything to store that data. Without knowing that, we can hardly advise you on how to parse the stored data, can we?

ojdas

Hi PaulS,

I have no any sample codes because I'm not familiar with C++ or similar C language :(
If possible could please help me and write sample code how to parse data from URL to extract information?
Thank you in advance.
Piotr

UKHeliBob

Have you not got any code running on the Arduino that will at least get the whole URL ?
I presume that you have an Ethernet shield.  Did that come with any example programs or links to them ?
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Go Up