connecting arduino to internet

i’m using Arduino Mega 2560 and wifi shield CC3000 i want to send POST request over internet to my web server

#include <Adafruit_CC3000.h>
#include <SPI.h>
#define analogpin 2
#define WLAN_SSID             "Ako" //my ssid
#define WLAN_PASS             "1234567a"//my wifi paaword
#define WLAN_SECURITY         WLAN_SEC_WPA2
#define ADAFRUIT_CC3000_IRQ   3
#define ADAFRUIT_CC3000_VBAT  5
#define ADAFRUIT_CC3000_CS    10   
#define analogpin 0 
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT, SPI_CLOCK_DIV2);
uint32_t ip = cc3000.IP2U32(192,168,1,20);//my default getaway of my router  


int port = 80;
int value_sensor = 0;
void setup(void)
{
  pinMode(analogpin,INPUT);
  Serial.begin(115200);

  if (!cc3000.begin())
  {
    Serial.println("Can't initiate wifi board...");
    while(1);
  }

  if(!cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY))
  {
     Serial.println("Can't connect to WiFi AP!");
  }
  Serial.println("Connected to WiFi AP...");

  Serial.println(F("Check DHCP..."));
  while (!cc3000.checkDHCP())
  {
    delay(100);
  }

}


void loop(void)
{

    Adafruit_CC3000_Client client = cc3000.connectTCP(ip, port);
    char thresholdsettings[16][4];
    value_sensor = analogRead(analogpin);

    Serial.println(value_sensor);
   if(value_sensor >=150)
    {
    Serial.println("puls");


       if (client.connected()) 
            { 
                client.println("POST /ard.php?mac=mac1 HTTP/1.1"); 
                client.println("Host: smartmeter.ga"); 
                client.println("Content-Type: application/x-www-form-urlencoded"); 
                client.println("Connection: close");        
                client.println();
                client.stop();      
             } 

    else   if (!client.connected()) 
        { 
    Serial.println("unble to connect to server");   
        }


    }


    delay(300);
}

but it can’t connect to internet when i send pulse it mast connect to my site

but it can connect and the output of serial monster will be “unble to connect to server” how can i fix this ? thanks…

uint32_t ip = cc3000.IP2U32(192,168,1,20);//my default getaway of my router  
...
void loop(void)
{

    Adafruit_CC3000_Client client = cc3000.connectTCP(ip, port);
...
    delay(300);
}

Is this server on your router?

Do you really want to connect to the router 3 times a second?

Nick Gammon no my router not a web server i want to connect to my server 3 times in second it is my web server server smartmeter.ga i want request to this URL smartmeter.ga/ard.php?mac=mac1