Are you familiar with ffmpeg? If it is installed on your server, you can try running on CLI
ffmpeg -i input.flac output.mp3
If that works, you can go on trying passing that command from your application to the shell (if you use for example PHP for your application and a Debian Linux as hosting.)
To include the bitrate you can use
ffmpeg -i input.flac -ab 128k output.mp3
or
ffmpeg -i input.flac -ab 320k output.mp3
If you can use it, see also the documentation: http://ffmpeg.org/ffmpeg.html It is possible, that you have to use a different command for the bitrate depending on your version.