Arduino Ethernet variable sending

I’m using my Arduino Ethernet, among other things to report the status of my system, which would be “OK” or “Failure”. To do this, I have a site, and can manually update the status like this: “Website Hosting - Mysite.com” or “Website Hosting - Mysite.com” It works just as it should. The problem is that I’m having trouble to do the same thing using the Arduino Ethernet. Actually, I’m not really sure how I should do this. I tried using the Web Client tutorial But it didn’t work.

My code:

/*
   Web client
  
  This sketch connects to a website (http://www.google.com)
  using an Arduino Wiznet Ethernet shield. 
  
  Circuit:
  * Ethernet shield attached to pins 10, 11, 12, 13
  
  created 18 Dec 2009
  modified 9 Apr 2012
  by David A. Mellis
  
  */

#include <SPI.h>
#include <Ethernet.h>

// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] = {  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
 IPAddress server(31,170,163,67); // My site

// Initialize the Ethernet client library
// with the IP address and port of the server 
// that you want to connect to (port 80 is default for HTTP):
 EthernetClient client;

void setup() {
  // Open serial communications and wait for port to open:
   Serial.begin(9600);


   // start the Ethernet connection:
   if (Ethernet.begin(mac) == 0) {
     Serial.println("Failed to configure Ethernet using DHCP");
     // no point in carrying on, so do nothing forevermore:
     for(;;)
       ;
   }
   // give the Ethernet shield a second to initialize:
   delay(1000);
   Serial.println("connecting...");

   // if you get a connection, report back via serial:
   if (client.connect(server, 80)) {
     Serial.println("connected");
     // Make a HTTP request:
     client.println("GET /?status=Failure HTTP/1.0"); // update from OK to Failure attempt
     client.println();
   } 
   else {
     // kf you didn't get a connection to the server:
     Serial.println("connection failed");
   }
}

void loop()
{
   // if there are incoming bytes available 
   // from the server, read them and print them:
   if (client.available()) {
     char c = client.read();
     Serial.print(c);
   }

   // if the server's disconnected, stop the client:
   if (!client.connected()) {
     Serial.println();
     Serial.println("disconnecting.");
     client.stop();

     // do nothing forevermore:
     for(;;)
       ;
   }
}

But it didn't work.

The code you posted did something. You expected it to do something. If those two somethings were the same thing, it is unlikely that you would have posted.

So, clearly they are not the same thing. But, what either of them is is undefined. We can't help you until we know what the problem is.

The Arduino Returned the code for the Error 404 page from my host.

blacblu:
The Arduino Returned the code for the Error 404 page from my host.

If you type that IP address in your web browser and append what you are looking for, what result do you get?

If your web site is a virtual host, you’ll need to add "Host: " into the HTTP request, otherwise the web server won’t know which domain you are wanting to use.

That is not the IP Address of my site, I changed it for privacy reasons, but even when I type the right one I get the custom Error 404 page from my host, which by the way isn’t local.

blacblu:
but even when I type the right one I get the custom Error 404 page from my host, which by the way isn’t local.

If your web site is a virtual host, you’ll need to add "Host: " into the HTTP request, otherwise the web server won’t know which domain you are wanting to use.