Send data using Arduino GSM shield GET/POST/PUT? I am trying to modifiy the Arduino GSM library Xively example to geeknesia.com. The serial said "successconnecting.." but I didn't get any value change in the website. Did I make a mistake with this code?

//Project Name Test sensor
#include &lt;GSM.h&gt;

#define PINNUMBER ""

//APIkey untuk Geeknesia
#define APIKEY  "c3ce75cc23386ca4ca663c0ed11653c5"
#define GPRS_APN       "xlunlimited"   
#define GPRS_LOGIN     ""
#define GPRS_PASSWORD  ""

GSMClient client;
GPRS gprs;
GSM gsmAccess;
GSMServer server(80);    

char IPserver[]="geeknesia.com";
unsigned long lastConnectionTime = 0; 
boolean lastConnected = false;
const unsigned long postingInterval = 10*1000;
int ldr1;
char ldr1_ar[10];

void setup() {
   Serial.begin(9600);
   boolean notConnected = true;
   Serial.println("try to connect...");
   while (notConnected) {
    if ((gsmAccess.begin(PINNUMBER) == GSM_READY) &amp;
        (gprs.attachGPRS(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD) == GPRS_READY))
      notConnected = false;
    else {
      Serial.println("can't connect");
      delay(1000);
    }
  }
  Serial.println("connected");
}

void sendData(int thisData) {
  if (client.connect(IPserver, 80)) {
    Serial.println("connecting...");
    client.print("GET /api/data?api_key=c3ce75cc23386ca4ca663c******&amp;attributes={");
    client.print("\"ldr1\":" + String(ldr1));
    client.print("}");
    client.print("\r\n\r\n");
    client.print("Content-Length: ");
    int thisLength = 8 + getLength(thisData);
    client.println(thisLength);
    client.println("Connection: close");
    client.println();
    //client.print("cahaya,");
    client.println(thisData);
  } else {
    Serial.println("connection failed");
    Serial.println();
    Serial.println("disconnecting.");
    client.stop();
  }
  lastConnectionTime = millis();
}

int getLength(int someValue) {
  int digits = 1;
  int dividend = someValue /10;
  while (dividend &gt; 0) {
    dividend = dividend /10;
    digits++;
  }
  return digits;
}

void loop() {
  ldr1 = analogRead(A0);
  //sendData(ldr1);
  if (client.available()) {
     char c = client.read();
     Serial.print(c);
  }
  if (!client.connected() &amp;&amp; lastConnected) {
    client.stop();
  }
  if(!client.connected() &amp;&amp; ((millis() - lastConnectionTime) &gt; postingInterval)) {
    sendData(ldr1);
  }
  lastConnected = client.connected();
}
Your GET request is ill-formed. Based on your server's API docs, it should look like this instead:

Serial.println("connecting...");
client.print("GET /api/data?api_key=c3ce75cc23386ca4ca663c******&amp;attributes={");
client.print("\"ldr1\":" + String(ldr1));
client.print("}");
client.println(" HTTP/1.1");
client.println("Host: api.geeknesia.com");
client.println();


While it is technically not illegal to have a body in a GET request, according to the HTTP 1.1 specs, the body should have no effect on the server's response i.e. it should be basically meaningless. Your server's API docs indicate that a body isn't needed/supported when you send data with GET, as is the case with most other servers. 

You should consider replacing Arduino Strings with C char arrays; they're a lot safer and reliable.