CodeIgniter Forums
Sending and Receiving Variables... - Printable Version

+- CodeIgniter Forums (
+-- Forum: Using CodeIgniter (
+--- Forum: General Help (
+--- Thread: Sending and Receiving Variables... (/thread-64682.html)

Sending and Receiving Variables... - jocm.aguiar - 03-20-2016

Hi guys.

I'm working on different applications. And I need to send a variable from one application to another application both made with CI3, an example?

RE: Sending and Receiving Variables... - kilishan - 03-20-2016

I don't have an example at hand, but you'd probably use curl to send a POST request to a URL on the second website, where you'd have a controller setup and waiting to receive it.

RE: Sending and Receiving Variables... - PaulD - 03-21-2016

This might be of help.

I am, this week, just writing an export as CSV and import as CSV for a customer with multiple sites that wants to pass data between them. They are all CI sites but unfortunately they are totally different, on different servers, very different structures and natures of the sites. The owner wants to now pass customer info from one to another.

Up to now I could not think how they could do it, but the CURL suggestion with a POST is a great idea. Not sure what I will do about security or authorization but I will look into it. I only ever thought about CURL used for getting content from other sites that you don't control, but getting data from partner sites this way seems like a good way forward.

Thanks for the great suggestion.

Best wishes,