another attempt at using api written in php