Programing with php and serial port

I am using the below mention code

<?PHP if (isset($_GET['action'])) { exec("mode COM4 BAUD=115200 PARITY=N data=8 stop=1 xon=off"); $fp = fopen("COM4", "r+"); if($_GET['action']=="FORWARD"){ fwrite($fp,"0\r"); }else if ($_GET['action']=="STOP"){ fwrite($fp,"1\r"); } } fclose($fp); ?> ARDUINO

My webcam!

Every time I click the buttons , a new connection is established each time. And after some button clicks it is showing too many connections.
I just want to stream the live video. The submit action should have no impact on the live stream.

There is absolutely no Arduino related question in your post. If you have a PHP question, this is not the right forum for you.

Sir , the back end is an Arduino UNO.

I hope somebody is working with serial port

Sir , the back end is an Arduino UNO.

But you have no question regarding the Arduino. Your problem is a PHP problem and is not related directly to the Arduino.

subhendusc: Sir , the back end is an Arduino UNO.

... which seems irrelevant to your question. If you're having trouble with PHP code, a PHP forum is the place to ask for help.