Sim808 module HTTP Bad request
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";