Skip to content

Create WebClientReadResponse.ino#1

Open
martinius96 wants to merge 1 commit into
CisecoPlc:masterfrom
martinius96:patch-1
Open

Create WebClientReadResponse.ino#1
martinius96 wants to merge 1 commit into
CisecoPlc:masterfrom
martinius96:patch-1

Conversation

@martinius96
Copy link
Copy Markdown

Read response from server and parse variable from txt file or php script, html etc, very easily.

This parser created by me serves to read the response from the webserver and parse the variable found in a file. The most common is the .txt file, or any line of php code that is cut off as needed. In the example provided by me,

I have set the answer reading from my site with the appropriate number of rows. On each webserver, the number of rows is different due to the length of the header. This is changing, for example, due to the use of another engine (Nginx, Apache, Xampp, Wamp), operating system.

You can determine the number of response lines on your site from the number of lines received, and replace that number instead of the number 12 in the code.
There:
else if (x==12) readString += c; //our variable
My webserver response for instance:
Image of response
I'd like to provide additional information about reading this line of response. This is a very practical thing especially for relay control over the Internet, IoT, Intelligent homes and similar interactive projects where Ethernet is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant