hello I'm back again, the cpanel it's the control paranel from my webSite and I get this data:
Access your website | http://arduinosensor.hostzi.com |
---|---|
Access your website with www. | http://www.arduinosensor.hostzi.com |
Website IP address | 31.170.160.99 |
Server name | server35.000webhost.com |
and my code is this:
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte gateway[] = { 192, 168, 1, 254 };
byte subnet[] = { 255, 255, 255, 0 };
IPAddress server( 31,170,160,99 );
int s[20];
EthernetClient client;
void setup(){
Ethernet.begin(mac, gateway, subnet);
delay(1000);
Serial.begin(9600);
}
void loop(){
for(int a=0;a<20;a++){
s[a]=random(10, 15);
}
mysql_ins();
}
void mysql_ins(){
if (client.connect(server, 80)) {
client.print("GET /arduino/read.php?s1=");
client.print(s[0]);
for(int a=1;a<20;a++){
client.print("&s");
client.print(a+1);
client.print("=");
client.print(s[a]);
}
client.println(" HTTP/1.1");
client.println("Host: localhost");
client.println();
Serial.println("ARDUINO: HTTP message sent");
delay(3000);
if(client.available()){
Serial.println("ARDUINO: HTTP message received");
Serial.println("ARDUINO: printing received headers and script response...\n");
while(client.available()){
char c = client.read();
Serial.print(c);
}
}else{
Serial.println("ARDUINO: no response received / no response received in time");
}
client.stop();
}else{
Serial.println("connection failure");
}
}