Esp8266 wifi to control led?

Hi friends,
I am interfacing esp8266 wifi module with arduino, using below cpde i am not able to toggle led, please can anybody have code for esp8266 to control led using html and using mobile tcp client app

#include <SoftwareSerial.h>
#define DEBUG true
SoftwareSerial esp8266(2,3); // make RX Arduino line is pin 2, make TX Arduino line is pin 3.
                             // This means that you need to connect the TX line from the esp to the Arduino's pin 2
                             // and the RX line from the esp to the Arduino's pin 3
//here you do cross connection now in this code it able join two networks using tcp client.

void setup()
  esp8266.begin(9600); // your esp's baud rate might be different

  sendData("AT+CWMODE=2\r\n",1000,DEBUG); // configure as access point
//  delay(100);
  sendData("AT+CWLAP\r\n",1000,DEBUG); // configure as access point
//  delay(100);
  sendData("AT+CWJAP=vajramuni,12121313\r\n",1000,DEBUG); // configure as access point
//  delay(100);
  sendData("AT+CIFSR\r\n",1000,DEBUG); // get ip address
//  delay(100);
  sendData("AT+CIPMUX=1\r\n",1000,DEBUG); // configure for multiple connections
//  delay(100);
  sendData("AT+CIPSERVER=1,8888\r\n",1000,DEBUG); // turn on server on port 80
void loop()
  if(esp8266.available()) // check if the esp is sending a message 
     delay(1000); // wait for the serial buffer to fill up (read all the serial data)
     // get the connection id so that we can then disconnect
     int connectionId =; // subtract 48 because the read() function returns 
                                           // the ASCII decimal value and 0 (the first decimal number) starts at 48
     esp8266.find("pin="); // advance cursor to "pin="
     int pinNumber = (*10; // get first number i.e. if the pin 13 then the 1st number is 1, then multiply to get 10
     pinNumber += (; // get second number, i.e. if the pin number is 13 then the 2nd number is 3, then add to the first number
     digitalWrite(pinNumber, !digitalRead(pinNumber)); // toggle pin    
     // make close command
     String closeCommand = "AT+CIPCLOSE="; 
     closeCommand+=connectionId; // append connection id
     sendData(closeCommand,1000,DEBUG); // close connection
* Name: sendData
* Description: Function used to send data to ESP8266.
* Params: command - the data/command to send; timeout - the time to wait for a response; debug - print to Serial window?(true = yes, false = no)
* Returns: The response from the esp8266 (if there is a reponse)
String sendData(String command, const int timeout, boolean debug)
    String response = "";
    esp8266.print(command); // send the read character to the esp8266
    long int time = millis();
    while( (time+timeout) > millis())
        // The esp has data so display its output to the serial window 
        char c =; // read the next character.
    return response;

For html i used this code

		<title>ESP8266 LED Control</title>
	<!-- in the <button> tags below the ID attribute is the value sent to the arduino -->
	<button id="11" class="led">Toggle Pin 11</button> <!-- button for pin 11 -->
	<button id="12" class="led">Toggle Pin 12</button> <!-- button for pin 12 -->
	<button id="13" class="led">Toggle Pin 13</button> <!-- button for pin 13 -->
	<script src="jquery.min.js"></script>
	<script type="text/javascript">
				var p = $(this).attr('id'); // get id value (i.e. pin13, pin12, or pin11)
				// send HTTP GET request to the IP address with the parameter "pin" and value "p", then execute the function
				$.get("", {pin:p}); // execute get request