GPRS SIM900 read web

Hi,

I have a problem with this simple code.

#include <SoftwareSerial.h>

SoftwareSerial SIM900(7, 8); // configure software serial port

void setup() {     
  pinMode(9, OUTPUT);
  digitalWrite(9, HIGH);
  
  SIM900.begin(19200);
  Serial.begin(19200); 
  Serial.println("power up" );
  delay(15000); 
}

void loop()
{
  Serial.println("SubmitHttpRequest - started" );
  SubmitHttpRequest();
  //callSomeone();
  Serial.println("SubmitHttpRequest - finished" );
  delay(10000);

}

void SubmitHttpRequest()
{
  SIM900.println("AT+CSQ"); // Signal quality check
  delay(100);
  ShowSerialData();
 
  SIM900.println("AT+CSQ"); // Signal quality check
  delay(100);
  ShowSerialData();
  
  SIM900.println("AT+CGATT?"); //Attach or Detach from GPRS Support
  delay(100);
  ShowSerialData();
  
  SIM900.println("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"");
  delay(1000);
  ShowSerialData();
 
  SIM900.println("AT+SAPBR=3,1,\"APN\",\"gprs-service.com\"");
  delay(1000);
  ShowSerialData();
 
  SIM900.println("AT+SAPBR=1,1");
  delay(1000);
  ShowSerialData();
  
  SIM900.println("AT+HTTPINIT"); //init the HTTP request
  delay(1000); 
  ShowSerialData();
  
  SIM900.print("AT+HTTPPARA=\"URL\",\"http://xxxxxx.com/master.php");
  SIM900.println("\"");
  delay(1000);
  ShowSerialData();
  
  SIM900.println("AT+HTTPACTION=0");//submit the request 
  delay(10000);
  ShowSerialData();
  
  SIM900.println("AT+HTTPREAD");// read the data from the website you access
  delay(500);
  ShowSerialData();
  
  SIM900.println("");
  delay(100);

  SIM900.println("AT+HTTPTERM");// read the data from the website you access
  delay(300);
  ShowSerialData();
}

void getContent()
{
  String content = "";
  while(SIM900.available() != 0)
  {
    content = content + String(char(SIM900.read()));
    Serial.write(char(SIM900.read()));
    delay(500);
    Serial.flush();
  }
}
 
void ShowSerialData()
{
  while(SIM900.available()!=0)
    Serial.write(char (SIM900.read()));
}

Receipt few characters, the output is this:

power up
SubmitHttpRequest - started
AT+CSQ

+CSQ: 25,0

OK
AT+CSQ

+CSQ: 25,0

OK
AT+CGATT?

+CGATT: 1

OK
AT+SAPBR=3,1,"CONTYPE","GPRS"

OK
AT+SAPBR=3,1,"APN","gprs-service.com"

OK
AT+SAPBR=1,1

OK
AT+HTTPINIT

OK
AT+HTTPPARA="URL","http://xxxxxx.com/master.php"

OK
AT+HTTPACTION=0

OK

+HTTPACTION:0,200,66
AT+HTTPREAD

+HTTPREAD:66
Numero de accesos: 77 | Identifica
AT+HTTPTERM

OK
SubmitHttpRequest - finished

But, realy, the output should be:
Numero de accesos: 77 | Identificador: 4l02pnl828o3kctg4strc87ed1

Any ideas or help?

Thanks!

These problems drive me crazy haha

    Serial.flush();

Why? If you know what this function does, explain why you are using. If you don't know what the function does, explain why you are calling it.

void ShowSerialData()
{
  while(SIM900.available()!=0)
    Serial.write(char (SIM900.read()));
}

Assume that all serial data that is the response is ready to be read, and that nothing else is mixed in the packet. Both assumptions are completely wrong.