PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have 2 systems that I need to integrate, lets call these Vanilla and Chocalate. From vanilla I need to call chocolate code but the problem is that both systems share global variables and classes with the same names so I need to run them in different memory spaces.
My first though was to run the script with the chocolate code in an iFrame but
I don't want the user to see the parameters (if they did a view source)
I need to pass information back to the main vanilla script
Now, clearly chocolate_integration_script.php cannot create cookies on the client machine, but can it create a session or update session variables that the parent script can read ?
Thu purpose of chocolate_integration_script.php is to log a user in and the returned data will be a session ID. Since the script woun't be able to create cookies, this will be a cookieless session and the session ID will be passed around in the querystring.
If not, it sounds like your not wanting to make an HTTP request to fetch the "response". Is there a reason you can't just implement this as a function on the initial page?
The vanilla system in the logon processing page has a bunch of includes and a whole lot of globals and classes are declared.
Now to peform the logon in the chocolate system I need to include chocolate code which declares other globals and classes. Problem is many of these have the same name as those in the vanilla system.
If nothing sensitive is passed to this chocolate_integration_script.php, I would suggest redirectingthe user to another page which can process the users session details without any compatability conflicts, and afterwards redirect again to a page such as their profile.