Controlling a/c using raw codes and webserver

Hi, im new in arduino, so im trying to build a code to control my a/c via webserver by sending raw codes...
I found a sketch that looks perfect so i change it to my own IR raw codes, but it doesnt work, can anybody tell what am i doing wrong??

Im using uno r3 + ethernet w5100 + ir led

#include "SPI.h"
#include "Ethernet.h"
#include "WebServer.h"
#include <IRremote.h>

template<class T>
inline Print &operator <<(Print &obj, T arg)
{ obj.print(arg); return obj; }

//IR Variable declaration
IRsend irsend;

//acon
unsigned int airpower[38] = {8300,4150,550,1550,500,1600,500,1550,550,550,500,1600,500,550,550,1550,500,1600,500,4150,550,1550,550,1550,550,500,550,1550,550,500,550,500,550,500,550,500,650,};

//tempup
unsigned int tempdown[38] = {8250,4200,450,1650,450,1650,450,1650,500,550,450,1650,450,600,450,1650,450,1650,450,4200,450,600,500,550,500,1600,500,600,450,600,500,550,450,600,450,600,550,};

//tempdown
unsigned int tempup[38] = {8300,4150,500,1600,450,1650,450,1600,500,600,500,1600,450,600,500,1600,500,1600,500,4150,500,1600,500,550,500,1600,500,550,550,500,550,500,550,500,550,550,550,};

//auto
unsigned int autop[38] = {8300,4150,500,1600,500,1600,500,1600,500,550,500,1600,500,550,500,1600,500,1600,500,4150,500,1600,500,1600,500,550,500,600,450,600,450,600,450,600,450,600,550,};

//powersaver
unsigned int pwsaver[38] = {8250,4200,500,1600,500,1600,500,1550,500,600,450,1650,450,600,500,1600,500,1600,450,4200,500,550,500,1600,500,550,500,1600,500,550,500,550,500,550,550,550,550,};

// MAC
static uint8_t mac[] = { 0xA2, 0xB8, 0xD8, 0xD4, 0xFD, 0x43 };

// IP
static uint8_t ip[] = { 192, 168, 1, 103 };

#define PREFIX ""

WebServer webserver(PREFIX, 80 );


void acOn(WebServer &server, WebServer::ConnectionType type, char *url_tail, bool tail_complete)
{
  if (type == WebServer::POST)
  {
    server.httpFail();
    return;
  }

  //server.httpSuccess(false, "application/acOn");
  server.httpSuccess();

  //Replace for your IR Code here. 
  irsend.sendRaw(airpower,38,38); 
  delay(40);
}

void tempUp(WebServer &server, WebServer::ConnectionType type, char *url_tail, bool tail_complete)
{
  if (type == WebServer::POST)
  {
    server.httpFail();
    return;
  }

  server.httpSuccess();
  
 //Replace for your IR Code here. 
  irsend.sendRaw(tempup,38,38);
  delay(40);
 
}

void tempDown(WebServer &server, WebServer::ConnectionType type, char *url_tail, bool tail_complete)
{
  if (type == WebServer::POST)
  {
    server.httpFail();
    return;
  }

  server.httpSuccess();

  //Replace for your IR Code here.
  irsend.sendRaw(tempdown,38,38);
  delay(40);
}


void autoP(WebServer &server, WebServer::ConnectionType type, char *url_tail, bool tail_complete)
{
  if (type == WebServer::POST)
  {
    server.httpFail();
    return;
  }

  server.httpSuccess();

  //Replace for your IR Code here.
  irsend.sendRaw(autop,38,38);
  delay(40);
}


void pwSaver(WebServer &server, WebServer::ConnectionType type, char *url_tail, bool tail_complete)
{
  if (type == WebServer::POST)
  {
    server.httpFail();
    return;
  }

  server.httpSuccess();

  //Replace for your IR Code here.
  irsend.sendRaw(pwsaver,38,38);
  delay(40);
}

void setup()
{

  Ethernet.begin(mac, ip);
  webserver.begin();

  webserver.addCommand("acon", &acOn);
  webserver.addCommand("tempup", &tempUp);
  webserver.addCommand("tempdown", &tempDown);
  webserver.addCommand("autop", &autoP);
  webserver.addCommand("pwsaver", &pwSaver);
}

void loop()
{
  webserver.processConnection();

}

Cant help you with the webserver stuff...

but

irsend.sendRaw(tempup,38,38);

may have an issue. Your buffer is indeed 38 long but only because you have a trailing ',' in the definition. So you should change the signal definition to 37 and leave out the trailing ',' in each of them. As it happens this may not be a fatal error in your case, but best to change all the same.

Also, I would try to get the IR working standalone first and ditto the webserver. Once both are working then integrate them into a final solution.

Finally, you need to provide better info than "it doesnt work"....if you want assistance. What debugging steps did you undertake yourself and what were the results? What is the make/model of teh AC unit & remote?