I can't figure out what I'm missing. I am trying to send data from my sensor to a mysql db without success.
If I change everything from client.XXXXXX to Serial.XXXX then copy and paste the url into a browser, it works like a charm. I'm guessing there is something wrong with my header information. Can anyone help? I've found several threads that follow similar issues, and have tried all suggestions like changing client.println("GET http://xxxxx.bmpdev.com/push.php?xxxxxxxxxxx");
char server[] = "xxxxx.bmpdev.com";
if (client.connect(server, 80)) {
Serial.println("connecting...");
// send the HTTP PUT request:
Serial.println();
client.println("GET /push.php?user=1&rt=");
client.print(DHT.humidity);
client.print("&h=");
client.print(DHT.temperature * 1.8 + 32);
client.print(" HTTP/1.1");
client.println("Host: xxxxx.bmpdev.com");
client.println("Connection: close");
Serial.println("Finished sending data");
// note the time that the connection was made:
lastConnectionTime = millis();
}