problem connecting... ???

I connected the arduino in university
connect hosting www.autocontrol.in.th

connect…???

#include <SPI.h>
#include <Ethernet.h>

// assign a MAC address for the ethernet controller.
// fill in your address here:
byte mac[] = { 
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
// fill in an available IP address on your network here,
// for manual configuration:
IPAddress ip(10,33,3, 27);
IPAddress gateway(10,33,3, 254);
IPAddress subnet(255, 255, 255, 0);

// fill in your Domain Name Server address here:
//IPAddress myDns(122,155,187,95);

// initialize the library instance:
EthernetClient client;

char server[] = "www.autocontrol.in.th";

unsigned long lastConnectionTime = 0;          // last time you connected to the server, in milliseconds
boolean lastConnected = false;                 // state of the connection last time through the main loop
const unsigned long postingInterval = 1*1000;  // delay between updates, in milliseconds ????????????? update 10 ??? 5 ?? ?????????????????????? conn ?????????????????
boolean startRead = false;


int ledPins[] ={2, 3, 4, 5, 6, 7, 8, 9}; // LED Pin ?????????? pin ??? led ????????????????? OK
char buffer[16];

void setup() {
  // start serial port:
  Serial.begin(9600);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  // give the ethernet module time to boot up:
  delay(1000);
  // start the Ethernet connection using a fixed IP address and DNS server:
  Ethernet.begin(mac, ip, gateway, subnet);
  // print the Ethernet board/shield's IP address:
  Serial.print("My IP address: ");
  Serial.println(Ethernet.localIP());
}

void loop() {
  // if there's incoming data from the net connection.
  // send it out the serial port.  This is for debugging
  // purposes only:
  if (client.available()) {
    dataReceived();  
  }

  // if there's no net connection, but there was one last time
  // through the loop, then stop the client:
  if (!client.connected() && lastConnected) {
    Serial.println();
    Serial.println("disconnecting.");
    client.stop();
    startRead=false;
  }

  // if you're not connected, and ten seconds have passed since
  // your last connection, then connect again and send data:
  if(!client.connected() && (millis() - lastConnectionTime > postingInterval)) {
    httpRequest();
  }
  // store the state of the connection for next time through
  // the loop:
  lastConnected = client.connected();
}

// this method makes a HTTP connection to the server:
void httpRequest() {
  // if there's a successful connection:
  if (client.connect(server, 80)) {
    Serial.println("connecting...");
    // send the HTTP PUT request:
    //char url[64];
    
    //sprintf(url, "/test/status.php?device1=1&try=%u", lastConnectionTime);
    //sprintf(url, "GET %s HTTP/1.1", url);
   
    //Serial.print(url);
    startRead=false;
    client.println("GET /Electical/user/status.php?user_home=boss HTTP/1.1");
    //client.println("GET /test/status.php? HTTP/1.1");
    client.println("Host: www.autocontrol.in.th");
    client.println("User-Agent: arduino-ethernet");
    client.println("Connection: close");
    client.println();

    // note the time that the connection was made:
    lastConnectionTime = millis();
  } 
  else {
    // if you couldn't make a connection:
    Serial.println("connection failed");
    Serial.println("disconnecting.");
    client.stop();
  }
}

void dataReceived(){
     
     char c = client.read();
    
     if (c == '[' ) { 
        startRead = true;  
     }else if(startRead){
      static int buffer_idx=0;

      if ( c!=']' && buffer_idx < 15 ) {
        buffer[buffer_idx] = c;      
        buffer_idx++;
      }
      else
      {
        buffer[buffer_idx] = '\0';
        buffer_idx = 0;
        
        Serial.println(buffer);
        
        char * s0 = strtok(buffer, ",");
        doWork(0, s0);
        char * s1 = strtok(NULL, ",");
        doWork(1, s1);
        char * s2 = strtok(NULL, ",");
        doWork(2, s2);
        char * s3 = strtok(NULL, ",");
        doWork(3, s3);
        char * s4 = strtok(NULL, ",");
        doWork(4, s4);
        char * s5 = strtok(NULL, ",");
        doWork(5, s5);
        char * s6 = strtok(NULL, ",");
        doWork(6, s6);
        char* s7 = strtok(NULL, ",");
        doWork(7, s7);
        
       
      }
    }
    
}

void doWork(int index, char* val){
  
  int state=atoi(val);
  
  
  if(state==2) TurnOn(index);
  else if(state==1) TurnOff(index);
  
    
}
void TurnOn(int index){
  digitalWrite(ledPins[index], HIGH); 
  Serial.print("LED ");
  Serial.print(index);
  Serial.println(" ON");
}
void TurnOff(int index){
  digitalWrite(ledPins[index], LOW); 
  Serial.print("LED ");
  Serial.print(index);
  Serial.println(" OFF");
}

ad1.png

ad2.png

ad3.png

ad4.png

Your call to Ethernet.begin() is not correct. You will not be able to access anything outside your localnet.

// change this...
  Ethernet.begin(mac, ip, gateway, subnet);
// ... to this:
  Ethernet.begin(mac, ip, gateway, gateway, subnet);

If the router is not capable of resolving dns requests, change the first gateway parameter to a dnServer ip.

Or use dhcp to obtain network settings.

Thank you

i setting dns server

IPAddress ip(10,33,3, 27);
IPAddress gateway(10,33,3, 254);
IPAddress subnet(255, 255, 255, 0);
IPAddress mydns(202, 28, 34, 193);
Ethernet.begin(mac, ip, mydns,gateway, subnet);