Sim808 module HTTP Bad request I have an Arduino UNO and sim808 EVB-V3.02.4. 
I want to send a GET request to my url but I always receive 400 Http bad request error.

#include &lt;DFRobot_sim808.h&gt;
#include &lt;SoftwareSerial.h&gt;

#define PIN_TX    7
#define PIN_RX    8
SoftwareSerial mySerial(PIN_TX,PIN_RX);
DFRobot_SIM808 sim808(&amp;mySerial);//Connect RX,TX,PWR,

char http_cmd[] = "GET /index.php?lat=10&amp;long=100 HTTP/1.0\r\n\r\n";
char buffer[512];

void setup() {
  mySerial.begin(9600);
  Serial.begin(9600);
}

void loop() {
  //*********** Attempt DHCP *******************
  while(!sim808.join(F("cmnet"))) {
      Serial.println("Sim808 join network error");
      delay(2000);
  }

  //************ Successful DHCP ****************
  Serial.print("IP Address is ");
  Serial.println(sim808.getIPAddress());

  //*********** Establish a TCP connection ************
  while(!sim808.connect(TCP,"39c309ae.ngrok.io", 80)) {
      Serial.println("Connect error");
  }
  Serial.println("Connection success");


  //*********** Send a GET request *****************
  Serial.println("waiting to fetch...");
  sim808.send(http_cmd, sizeof(http_cmd)-1);
  while (true) {
      int ret = sim808.recv(buffer, sizeof(buffer)-1);
      if (ret &lt;= 0){
          Serial.println("fetch over...");
          break; 
      }
      buffer[ret] = '\0';
      Serial.print("Recv: ");
      Serial.print(ret);
      Serial.print(" bytes: ");
      Serial.println(buffer);
      break;
  }

  //************* Close TCP or UDP connections **********
  sim808.close();

  //*** Disconnect wireless connection, Close Moving Scene *******
  sim808.disconnect();
  delay(5000);  
  }


My php code:

&lt;?php
file_put_contents('test.txt', $_GET['lat'] . '---' . $_GET['lon']);
print '
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Good&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
Was Good
&lt;/body&gt;
&lt;/html&gt;
';
?&gt;


I want just open http://39c309ae.ngrok.io/index.php?lat=10&amp;long=100 with arduino and sim808.

What is wrong in my codes?
You aren't sending the Host: header with your request.  Without that the web server has no idea which website you want to get the /index.php page from.

char http_cmd[] = "GET /index.php?lat=10&amp;long=100 HTTP/1.0\r\n"
                  "Host: 39c309ae.ngrok.io\r\n"
                  "\r\n";