how to make get request esp8266 properly?

  arduino-esp8266, c++, esp8266, get

so me and my friend try to build a water high detector using ultrasonic sensor, lets skip this part because its has no problem on it. iam trying to make a simple page to display all the information that given by the NodeMCU ESP8266 at a web service. i make a simple controller using php GET Method to insert data on the database. now i am attach the link to PHP controller in my ESP8266. everything is normal, database are good. but now im getting notification because my shared hosting are very bussy because of my tons of request. btw i cannot afford a server. so i borrow my friend`s server and test it out. i just change the string url on the ESP8266 and its start showing

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 3460, room 16
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4
tail 4
chksum 0xc9
csum 0xc9
v00046000
~ld
Connecting..Connecting..Connecting..Connecting.

i have no idea. iam just change the STRING URL, nothing has change, i already check the link
i try it by insert the get manualy from browser, its works on bot of them. here is the quick code C for the ESP8266

#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>

const char* ssid = "UD SURYA LINGKAR";
const char* password = "DAYUMASS";

void setup() {
  Serial.begin (115200);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
 
    delay(1000);
    Serial.print("Connecting..");
    
 
  }

}

void loop() {
  int kondisi = 1;
  int jarak = 230;
  int tinggiAir = 100;
  if (WiFi.status() == WL_CONNECTED) { //Check WiFi connection status
 
    HTTPClient http;  //Declare an object of class HTTPClient
    //baru banget
    WiFiClient wifiClient;

    //String URL = "http://starway-community.com/watersensor/autosend.php?sensor="+ String(kondisi) +"&tinggiair="+ String(jarak) +"&levelair=" + String(tinggiAir);
   String URL =  "http://gusde.troke.id/autosend.php?sensor="+ String(kondisi) +"&tinggiair="+ String(jarak) +"&levelair=" + String(tinggiAir);
 
    http.begin(wifiClient, URL);  //Specify request destination
    http.GET();                                  //Send the request
    http.end();   //Close connection
  }
  delay(60000);

} ```

Source: Windows Questions C++

LEAVE A COMMENT