If you want it to work, you should upgrade to IDE v1.0.5. Prior versions have problems with connections. However, to use v1.0.5, you must upgrade the wifi shield firmware.
hi to all and thanks for your answer, but if i use IDE v1.0.5 i have this message "ERROR SERVER " because the ide 1.0.5 have a bug whit wifi shild, do you have other idea?
i rewrite the code
#include <WiFi.h>
#include <SPI.h>
char ssid[] = "my_wifi"; // IL NOME DEL SSID
char pass[] = "my_pw"; // password Rete
int status = WL_IDLE_STATUS; // stato connessione
IPAddress server(192,10,3,25); // server cicala
String strURL = ""; // url del file php èper inserire i dati
String id =""; // id
String temp =""; // temp
String hum =""; // hum
WiFiClient client;
void setup() {
Serial.begin(9600);
Serial.println("Attempting to connect to WPA network...");
status = WiFi.begin(ssid, pass);
if ( status != WL_CONNECTED) {
Serial.println("non è possibile connettersi al wifi");
while(true);
}
else {
Serial.println("Connected to network");
}
}
void loop() {
id="3";
temp="30";
hum="50";
if (client.connect(server,80)) // CONNESSION SERVER CICALA
{
Serial.println("Connesso");
strURL = "POST /wifi_connect/insert.php?id="+id+"&temp="+temp+"&hum="+hum+" HTTP/1.1";
// Serial.println("ho scritto 1 record");
Serial.println(strURL);
client.stop();
}// se sei connesso al server cicala
else {
Serial.println("IL SERVER NON è RAGGIUNGIBILE ");
}//
//esegui la richiesta ogni 10 secondi
delay(10000);
}