Just curious about this When I set the gateway & subnet on my server...
IPAddress ip(192,168,1,177); //setting subnet & gateway somehow interfers with calling external php script IPAddress gateway(192,168,1,1); IPAddress subnet(255, 255, 255, 0); Ethernet.begin(mac, ip, INADDR_NONE, gateway, subnet);
my code to connect to a client php script doesn't work
//post client.println(F("POST /arduino_script/arduino_mail.php HTTP/1.1")); client.println(F("Host: www.host.com")); client.println(F("Connection: keep-alive")); client.println(F("Content-Type: application/x-www-form-urlencoded")); client.print(F("Content-Length: ")); client.println(strlen(emailString)); client.println(); client.println(emailString);
But if I remove the gateway & subnet, it works.
Anybody knows why that is?
192,168,1,177 is port forward on the router btw.