Sync mysql database using php and json to an ios application