I want to run a PHP Script with an Infinite Loop on my Raspberry Pi to fade LED-Strips.
So the Script should contain an infinite loop and should be closed from outside of the loop.
For Example: Script gets a POST-Request from another PHP-script by ajax and should run the infinite loop for fading. If I select just a color for the LEDs the script gets another ajax-request and the infinite loop stops.
Do I need something similar to python subprocess and is something like this even available in PHP?
Thanks guys.