CALL PHP FILE

The OP sent me an IM asking about some problems they had with my suggestion. I think my response may prove helpful to others, so I am copying it here:

You made a couple of mistakes in your code, it should look like this:

// if there's a successful connection:
  if (client.connect(serveur, 80)) {
    // send the HTTP GET request:
    Serial.println("Connected");    
    client.println("GET /porteon.php HTTP/1.1");
    client.println("Host: 31.170.164.54");  // <-- Change this to 31.170.164.54
    client.println("User-Agent: arduino");
    client.println("Connection: close");    
    client.println();
    delay(50);
    client.stop();
  } 
  else {
    // if you couldn't make a connection:
    Serial.println("connection failed");
    Serial.println("disconnecting.");
    client.stop();

And as I mentioned earlier, you can use telnet to test the text exchange. Here is a telnet session I just did using the same text sequence that the above code sends.

wandrson@delphi:~$ telnet 31.170.164.54 80
Trying 31.170.164.54...
Connected to 31.170.164.54.
Escape character is '^]'.
GET /porteon.php HTTP/1.1
Host: 31.170.164.54
User-Agent: arduino
Connection: close

Connection closed by foreign host.
wandrson@delphi:~$

I also tested the same process with the php script you used in your email

wandrson@delphi:~$ telnet 31.170.164.54 80
Trying 31.170.164.54...
Connected to 31.170.164.54.
Escape character is '^]'.
GET /venton.php HTTP/1.1
Host: 31.170.164.54
User-Agent: arduino
Connection: close

Connection closed by foreign host.
wandrson@delphi:~$

As you can see, both are successful. Using telnet us a great way to test the connection protocol, since it can give more feedback than you get when programming it through the Arduino.

For instance if you were to try it with the text sequence you used you get the following result:

wandrson@delphi:~$ telnet 31.170.164.54 80
Trying 31.170.164.54...
Connected to 31.170.164.54.
Escape character is '^]'.
Host: 31.170.164.54
HTTP/1.1 400 Bad Request
Server: nginx
Date: Fri, 23 May 2014 22:31:01 GMT
Content-Type: text/html
Content-Length: 166
Connection: close

<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx</center>
</body>
</html>
Connection closed by foreign host.
wandrson@delphi:~$