This is a simple PHP script that uses lame to concatenate MP3 files. It does NO error checking beyond what LAME might figure out and also does no shell escaping. I heavily advise against using this in any production capacity and would also advise it only be used as a baseline minimal viable product to build upon.
php concat.php [input files ...] [output file]
Concatenate two MP3 files: php concat.php low.mp3 high.mp3 merged.mp3
Concatenate an entire directory: php concat.php *.mp3 merged.mp3