Upload endpoint php code for pulling the data as JSON beginning from two day before to present