I need modification of lighttpd server for flv and mp4 file streaming. I need lighttpd to look for parameter in URL request. This parameter will be string containing user login and password hash. Lighttpd will take the parameter from URL and make request to my php application containing this taken parameter. My php page will return 0 or 1. If it returns 0, lighttpd will send back to user only part of video, if it returns 1, it will stream whole video. If the parameter is missing completely in request URL, it will always send only part of video.
I already wrote 90 % of this functionality in C myself (only faking of byte-range headers for mp4 files is missing, streaming does not work without it on iOS). My code works, but I am not skilled C developer, so I am sure I made tons of errors in the code. These will not show up on test server but I am sure they would show up when thousands of people connect on production servers. I need reliable stable solution. You can use my code just for inspiration or you can based the modification on it. It would be great if you could make me installation rpm file, which I would install with yum on CentOS. I will discuss all the details with chosen developer.