Works Locally But Not When Uploaded To Domain

Then you need to update your curl code to capture HTTP respons codes and JSON errors and/or curl verbose out and debug.