PHP script for processing given files