Ethernet shield problem

Hello,
I'm doing a project in which I want to measure temperature, humidity and soil moisture and control irrigation over a web app. I've started by writing a program that connects to a server (pastebin.com/cxuKprU3) and it works fine. I get something like this in the Arduino's serial.

Network call
connected
HTTP/1.1 200 OK
Date: Tue, 26 May 2015 16:04:17 GMT
Server: Apache/2.2.22 (Debian)
X-Powered-By: PHP/5.4.39-0+deb7u2
Content-Length: 125
Connection: close
Content-Type: text/html; charset=UTF-8

But as soon as I add some other code, for example reading from a DHT22 sensor (pastebin.com/qHGaedQ8), I only get

Network call
connected

disconnecting.
Network call end

.
in the serial. Does anyone know what I'm doing wrong?
I'm using an Arduino Uno.

I would use this. If you aren’t going to parse the return from the server and use it somewhere, just read and display it.

int networkCall(){
  if (client.connect(server, 80)) {
    String data="url=https://<page>";
    Serial.println("connected");
    client.println("POST /~<name>/my.php HTTP/1.1");
    client.println("Host: www.etfos.unios.hr");
    client.println("User-Agent: Arduino/1.0");
    client.println("Connection: close");
    client.println("Content-Type: application/x-www-form-urlencoded");
    client.print("Content-Length: ");
    client.println(data.length());
    client.println();
    client.println(data);
 
   while(client.connected()) {
     while (client.available()) {
          char c = client.read();
          Serial.write(c);
        }
     }
   }
   
   client.stop();
   Serial.println(F("\r\ndisconnected"));
  }
  else{
    Serial.println("connection failed");
  }
}

Actually, I was planning on doing just that :confused: