Jump to content

posting a json reponse to a php page - help


mds1256
Go to solution Solved by boompa,

Recommended Posts

Hi

 

I have a scenario which I want to be able to post JSON data to a php page which can then parse this.

 

I am learning how to make a mobile app (iOS) and wanting to POST a JSON response to a web service using PHP on the server to then parse this JSON response and allow PHP to do what ever it needs.

 

Any ideas how I can make a PHP page that will receive a POSTed JSON object and work with it?

 

Thanks

Link to comment
Share on other sites

  • Solution

For a simple test, try creating a page -- to which you will POST -- like this:

 

 

 

 

See here for more info on the argument

 

EDIT: BAH! The forum keeps eating my response.

 

The function you want is file_get_contents(). The argument to that is the second one on that page I liked to (the one that doesn't start with std)

Edited by boompa
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.