Log In Register
c
Converting FLAC sound files to MP3 in PHP using free API:

<?php
$url = 'http://server.com/sound.flac';
$data = json_decode(file_get_contents('http://api.rest7.com/v1/sound_convert.php?url=' . $url . '&format=mp3'));

if (@$data->success !== 1)
{
    die('Failed');
}
$mp3 = file_get_contents($data->file);
file_put_contents('sound.mp3', $mp3);