Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create WebClientReadResponse.ino #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

martinius96
Copy link

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