Ethernet shield not connecting to the Webserver - new to Arduino

  1. What you said is correct, i.e the hostname is resolving to a different IP {31, 170, 161, 36} than what I am currently using which is {31, 170, 160, 99}. However, I did try that earlier and got the same response from both the IPs.

  2. With HTTP/1.1 here is the response.

client.print("GET /test.php HTTP/1.1");
client.println("Host: venard.hostzi.com");
client.println("Connection: close\r\n");

connecting...
connected
Sent the http request
HTTP/1.1 400 Bad Request
Date: Sun, 26 Aug 2012 15:42:30 GMT
Server: Apache
Content-Length: 226
Connection: close
Content-Type: text/html; charset=iso-8859-1

400 Bad Request

Bad Request

Your browser sent a request that this server could not understand.

disconnecting.


  1. With HTTP/1.0 here is the response.
client.print("GET /test.php HTTP/1.0");
client.println("Host: venard.hostzi.com");
client.println("Connection: close\r\n");

connecting...
connected
Sent the http request
HTTP/1.1 302 Found
Date: Sun, 26 Aug 2012 15:43:35 GMT
Server: Apache
Location: http://error404.000webhost.com/?
Content-Length: 216
Connection: close
Content-Type: text/html; charset=iso-8859-1

302 Found

Found

The document has moved here.

disconnecting.