function insertScrobbler($song_id, $user_id, $type = 'jukebox') { mp3act_connect(); if (hasScrobbler($user_id, $type)) { $sql = "INSERT INTO mp3act_audioscrobbler VALUES (NULL,{$user_id},{$song_id},\"" . time() . "\")"; if (mysql_query($sql)) { submitScrobbler($user_id); return TRUE; } } return FALSE; }
function insertScrobbler($song_id, $user_id, $type = 'streaming') { grammafone_connect(); if (hasScrobbler($user_id, $type)) { $sql = "INSERT INTO grammafone_audioscrobbler VALUES (NULL,{$user_id},{$song_id},\"" . time() . "\")"; if (mysql_query($sql)) { submitScrobbler($user_id); return true; } } return false; }