So i have a file named instance.php that contains my class “listing”.page 2 is sending
$_POST arguments to instance.php. instance.php in favor instantiates an object of “listing” and echos a unique id. i want page 2 to capture this id, and maybe even more than that.
The problem is that instance.php and page 2 do not live in the same server. I know how to handle oop in Java quiet well but i’m getting the feeling that in php it’s not that straightforward. I’m pretty sure i’m missing something here.
Could you help me with suggesting a good design for my implementation requirement?
EDIT: To be clear, i’m searching for a way for two or more php files that don’t live on the same server/domain to have this relationship.
If you insist on using POST for interaction ( which is kinda strange choice ), then you will have to use cULR to facilitate it.
The other way would be to use
file_get_contents()function. That would limit you to using only GET method: