Arduino webclient + php

O codigo que estou usando é este aqui

#include <SPI.h>

#include <Ethernet.h>


// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192,168, 254,8 };
byte server[] = { 192,168,254,4 };

// variaveis a serem usadas para gravação
int valor = 10;

// 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):
Client client(server, 80);

void setup() {
  // start the Ethernet connection:
  Ethernet.begin(mac, ip);
  Serial.begin(9600);
  delay(500);
  Serial.print("connecting...");

  // if you get a connection, report back via serial:
  if (client.connect()) {
    
    Serial.println("connected");
    delay(00);
    // Make a HTTP request:
    
  } 
  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:
  for (int i = 0; i < 3; i++){
    if (client.connected()) {
      client.print("GET http://localhost/index1.php?dado=");
      client.print(valor);
      client.print(" HTTP/1.1");
      client.println();
    }
  }
  Serial.println("disconnecting.");
  client.stop();
  for(;;)
  ; 
}

e o php

<?php
      $VALOR = $_GET['dado'];
      $novoarquivo = fopen("..\www\dados.txt", "w+");
      $quebra = chr(13).chr(10);              
    fwrite($novoarquivo, $VALOR.$quebra);
      fwrite($novoarquivo, "DONE!".$quebra);
      fclose($novoarquivo);
?>

acho estranho pq eu já vi um monte de codigos, faço tudo igual mas não dá certo.

nofxx - achei interessante esse ruby, o codigo simples e interessante, mas como ficaria o codigo no arduino para acessar o codigo do ruby. Eu vou estudar sobre essa linguagem, principalmente essa parte mesmo de banco de dados. Onde tem bons tutoriais nessa area para essa linguagem?

bruno - na verdade cara eu queria um acesso como o bubu postou e não por serial. Eu estou usando o ethernet shield e queria usar o arduino como web client.