chaseb Posted October 10, 2006 Share Posted October 10, 2006 I am sorry, I just can't figure this out, but I know that it must be very simple. So, please help before I jab my eyes out! I have a php file, test.php, and I want to send a simple post to another php file on other server, and get a return. So something this.Call test.php > auto post www.mydomain.com/test2.php?myVar=200 > return from www.mydomain.com/test2.php to test.php return=true > test.php returns return=trueThanks for any help! Quote Link to comment https://forums.phpfreaks.com/topic/23547-simple-php-post-to-another-script-i-must-be-retarded/ Share on other sites More sharing options...
obsidian Posted October 10, 2006 Share Posted October 10, 2006 set the action of the form to the file you want to process the form. that's really all there is to it. Quote Link to comment https://forums.phpfreaks.com/topic/23547-simple-php-post-to-another-script-i-must-be-retarded/#findComment-106866 Share on other sites More sharing options...
Anidazen Posted October 10, 2006 Share Posted October 10, 2006 Not entirely sure what you want here, but you can use CURL to load another script from within your own - that can entirely simulate posting the form itself - the output from the first script could in itself be a return with this method, assuming you can customise both scripts.You might be wanting to include the second script. If this is the case, you can use functions from the second script, but all returns need passing through an array: return $whatever.Third option, if you're wanting to just bounce a user backwards and forwards between scripts, you could just use a simple refer? Quote Link to comment https://forums.phpfreaks.com/topic/23547-simple-php-post-to-another-script-i-must-be-retarded/#findComment-106872 Share on other sites More sharing options...
chaseb Posted October 10, 2006 Author Share Posted October 10, 2006 sorry if my post was a bit confusing. What I want to be able to to do, is call server1.com/test1.php from Flash, then have server1.com/test1.php do a call to server2.com/test2.php to post just one variable, then get server2.com/test2.php 's response and have server1.com/test1.php return that to flash. Quote Link to comment https://forums.phpfreaks.com/topic/23547-simple-php-post-to-another-script-i-must-be-retarded/#findComment-106927 Share on other sites More sharing options...
Ninjakreborn Posted October 10, 2006 Share Posted October 10, 2006 flash remoting?is that what you are talking about? Quote Link to comment https://forums.phpfreaks.com/topic/23547-simple-php-post-to-another-script-i-must-be-retarded/#findComment-106938 Share on other sites More sharing options...
chaseb Posted October 10, 2006 Author Share Posted October 10, 2006 no, just talking to a php script, no remoting involved - which is primarily focused on SOAP/Java/.Net based apps not PHP Quote Link to comment https://forums.phpfreaks.com/topic/23547-simple-php-post-to-another-script-i-must-be-retarded/#findComment-106940 Share on other sites More sharing options...
chaseb Posted October 10, 2006 Author Share Posted October 10, 2006 I am doing some testing now, and I just need to ask, PHP security domain permissions allow one PHP script to call another on a different server and get a return right? Quote Link to comment https://forums.phpfreaks.com/topic/23547-simple-php-post-to-another-script-i-must-be-retarded/#findComment-106979 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.