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?

Would storing the JSON in a DB on the php side, then fishing it out in coldfusion be stupid?  Considering the JSON could contain thousands of items..as writing this it seems like a terrible idea.  Any other ideas would be appreciated.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.