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:
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.
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:
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.
else if (x==12) readString += c; //our variable
My webserver response for instance: