PHP serial communication with Arduino

Insert Quote

Below is the code php /html code

<?php if (isset($_GET['action'])) { require("php_serial.class.php"); $serial = new phpSerial(); $serial->deviceset('COM4'); $serial->confBaudRate(115200); $serial->deviceOpen(); if ($_GET['action'] =="a") { $serial->sendMessage("0\r"); } if ($_GET['action'] =="b") { $serial->sendMessage("1\r"); } if ($_GET['action'] =="c") { $serial->sendMessage("2\r"); } else if ($_GET['action'] =="d") { $serial->sendMessage("3\r"); } $serial->deviceClose(); } ?> ARDUINO

Arduino

red on

red off

green on

green off

The arduino code is below
int redpin =13;
int greenpin =8;
int fanpin =9;
int incomingbyte;

void setup()
{
Serial.begin(115200);
pinMode(redpin,OUTPUT);
pinMode(greenpin,OUTPUT);
pinMode(fanpin,OUTPUT);
}

void loop()
{
if(Serial.available()>0)
{
incomingbyte=Serial.read();
}
if(incomingbyte == ‘0’)
{
digitalWrite(redpin,HIGH);
}
if(incomingbyte == ‘1’)
{
digitalWrite(redpin,LOW);
}
if(incomingbyte == ‘2’)
{
digitalWrite(greenpin,HIGH);
}
if(incomingbyte == ‘3’)
{
digitalWrite(greenpin,LOW);
}

}

I am using php_serial.class.php

Now the question is

When I run the php code ,only “0” is transmitted to the arduino. The arduino do not get any other integer. I have done all permutations, but could not debug.
Can anyone please help me
Please