CALL PHP FILE

I can't help with the Android part of the question, but here is a working example I have of using a Mega with an Ethernet shield to regularly (twice a minute) send a HTTP GET statement to my local web server.

If you are using a 328 or 32u4 chip, the first thing I would check is to see if you are running out of RAM. When using the Ethernet board I have found RAM on the smaller chips to be very tight and the errors are not easy to find.

#include <Time.h>
#include <Wire.h>
#include <SPI.h>
#include <Ethernet.h>
#include <Adafruit_BMP085.h>
#include "DHT.h"
#include "Adafruit_MCP9808.h"
#include <MCP79412RTC.h>
#include <SFE_TSL2561.h>

#define DHTTYPE DHT22  

const int DHTPIN=5;
const int ssPin = 53;      
const int http_port = 80;

byte mac[] = { 0xAC, 0x03, 0xFB, 0xB4, 0xEE, 0x00 };
char memoria[] = "192.168.0.100";
char location[] = "INDOOR";
//char location[] = "OUTDOOR";
unsigned char gain;     // Gain setting, 0 = X1, 1 = X16;
unsigned int ms;  // Integration ("shutter") time in milliseconds
static long lastPrint=0;

IPAddress ip(192,168,0,199);
IPAddress myDns(192,168,0,1);

DHT dht(DHTPIN, DHTTYPE);
Adafruit_BMP085 bmp;
Adafruit_MCP9808 tempsensor = Adafruit_MCP9808();
SFE_TSL2561 light;
EthernetClient client;

void httpRequest(char *query) {
  // if there's a successful connection:
  if (client.connect(memoria, http_port)) {
    // send the HTTP GET request:
    client.println(query);
    Serial.println(query);
    client.println("Host: 192.168.0.100");
    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();
  }
}

void setup() {
  Serial.begin(115200);
  
  delay(1000);
  // start the Ethernet connection using a fixed IP address and DNS server:
  Ethernet.begin(mac, ip, myDns);

  setSyncProvider(RTC.get);
  if (timeStatus() != timeSet)
    Serial.println("Unable to sync with the RTC");

  if (!tempsensor.begin()) {
    Serial.println("Couldn't find MCP9808!");
    while (1);
  }
  if (!bmp.begin()) {
	Serial.println("Could not find a valid BMP085 sensor, check wiring!");
	while (1) {}
  }
  dht.begin();
  light.begin();
  gain = 0;
  unsigned char time = 2;
  light.setTiming(gain,time,ms);
  light.setPowerUp();
}
  
void loop() 
{
  if ((millis() - lastPrint) > 30000L)
  {
    lastPrint = millis();
    char buffer[250];
    long dht_h = dht.readHumidity() * 10;
    long mcp_c = tempsensor.readTempC() * 100;
    long mcp_f = ((float) (tempsensor.readTempC() * 9.0 / 5.0 + 32.0))*100;
    long bmp_p = ((bmp.readPressure() / 1000.0) * 0.3)*100;
    unsigned int data0;
    unsigned int data1;
    light.getData(data0, data1);
    double lux;
    boolean good = light.getLux(gain,ms,data0,data1,lux);
    long llux = lux*100;

    sprintf(buffer, "GET /apps/add_env.php?rec_date=%04d-%02d-%02d%c20%02d:%02d:%02d&location=%s&temperature=%ld&pressure=%ld&humidity=%ld&illumination=%ld HTTP/1.1", 
      year(), month(), day(), '%', hour(), minute(), second(), location, mcp_f, bmp_p, dht_h, llux);
    Serial.println(buffer);
    httpRequest(buffer);
  }
}

My other suggestion is that before trying to debug your Arduino code, you TELNET into your web server and manually type in the same text you think you are trying to send via your Arduino to ensure the problem is not in the header/text you are sending to the server.