I have 2 PHP scripts, one residing on Server A and another on server B. I need to pass variables received via POST by PHP A to PHP B without the page redirecting. How can I do that?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use curl,
If you send POST-Data to this scrip it will send it to http://www.example.com/Target.php.
If it gets
$_POST["Foo"] = 10then it will send$_POST["foo"] = 10to Target.php.It uses all Post variables it gets with the same names and values.
EDIT:
If you want to send some vars you can do it like this:
after doing so you have to change the line from the example above:
needs to be changed to