After Edition: After I remove the port number from the host line and using strlen(data)instead of sizeof(data), the POST request works but only for first 7th posts. The output of serial monitor on Arduino is like that:
Attempting to connect to WPA SSID: WiFi-Repeater1
WiFi connected
SSID: WiFi-Repeater1
IP Address: 192.168.2.149
signal strength (RSSI):-66 dBm
Starting connection to post server...
connected to post server
Starting connection to post server...
connected to post server
Starting connection to post server...
connected to post server
Starting connection to post server...
connected to post server
Starting connection to post server...
connected to post server
Starting connection to post server...
connected to post server
Starting connection to post server...
connected to post server
Starting connection to post server...
Starting connection to post server...
Starting connection to post server...
Before the Editing, it was always giving me "connected to post server" and It always posts but as I told you before It takes a lot of time at the 3rd 6th 9th 12th ..... Now after the 7th post it will not posts.