Jump to content

Need to send JSON from php processing to public page


obobrar

Recommended Posts

I am modifying someones existing coldfusion web app.  I am adding php processing pages to do various tasks.  Up to this point I have just been calling the php pages, and interacting with the web app by passing variables via the url.

 

Current usage:

 

public.cfm calls processing.php?id=69

 

Then processing will do what it has too, then ultimately:

 

header("Location: $publichome?id=$id&importantstuff=$stuff");
exit();

 

And the webapp will pick up where it has too.  But now one of my scripts has to send a JSON object back instead of simple variables.  I don't know how to get this done.  I tried doing a post with cURL but that wasn't working because I need the public facing coldfusion page to take over and curl returns to the php script (I know I can echo the body of the curl result but this keeps me on the php script domain which I dont want).  Is there a way to do the above header location and send an object because thats what I need - the php script to stop and the coldfusion page to be served up with the object to work with.

 

Do I have to create some sort of JSON service in php, that the coldfusion page will call an retrieve the result?  If so how?

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.