title: Acces to an URL with Arduino Ehernet shield
body: <p>I am trying to access a <a href="http://en.wikipedia.org/wiki/PHP" rel="nofollow">PHP</a> file in my server with an Arduino and the Ethernet <a href="http://www.arduino.cc/en/Main/ArduinoShields" rel="nofollow">shield</a>. This file captures the URL parameters "Sensor" and "Value" and stores the read data into a database.</p>
  
  <p>This is my code:</p>
  
  <pre><code>#include &lt;SPI.h&gt;
  #include &lt;Ethernet.h&gt;
  
  EthernetClient client;
  
  byte MACaddress[] = {0xDE,0xAD,0xBE,0xEF,0xFE,0xED};
  byte IPaddress[] = {10,0,0,178};
  byte DNSserverIPaddress[] = {4,4,4,4};
  byte gatewayIPaddress[] = { 10, 0, 0, 100 };
  byte subnetMask[] = { 255, 255, 255, 0 };
  char serverName[] = "log.server.com";
  
  
  void setup() {
      Serial.begin(9600);
      Ethernet.begin(MACaddress, IPaddress, DNSserverIPaddress, gatewayIPaddress, subnetMask);
  }
  
  
  void loop()
  {
      delay (5000);
  
      Serial.println("connecting to server...");
      client.connect(serverName, 80);
      Serial.println("making HTTP request...");
      client.println("GET /logger.php?sensor=temp&amp;value=19 HTTP/1.1");
      client.println("HOST: log.server.com");
      client.println();
  }
  </code></pre>
  
  <p>After uploading this code to my <a href="http://arduino.cc/en/Main/arduinoBoardMega" rel="nofollow">Arduino Mega</a> + Ethernet shield, nothing changes in my database...</p>
  
  <p>What is wrong?</p>