Php Post variables to PHP on separate server without HTML
Posted: Fri Mar 27, 2009 2:22 pm
I need to send some data to a script file (cfm or php) on a separate domain from a Flash file (using AS 2). Because of the security issues with flash and cross domains, I have realized that I probably need to send the data to a php file on the same domain as the Flash file, which will in turn send the data to the cfm file on another domain. But I can't get that 3-way flow to work.
Since I don't have access to the cfm file on the separate domain, to test all of this, I'm using a separate domain that I DO have access to that can execute php scripts.
Test 1. I can get the php on server A to send the data to the php on server B just fine (the php on server b is writing to a database). Flash is not involved at all in this test.
Test 2. I can send the data from the Flash file on A to the php file on A just fine.
Test 3. But once I have Flash on A send the data to the php on A, which then sends it to the php on B, nothing appears to be happening as the php is not writing the data it should to a database file.
Flash: uses a sendAndLoad from the Flash to the php with a POST.
php on A: has a form in the php which has hidden fields with the posted data in it. When the php loads, I have a javascript that submits the form.
php on B: receives Posted data and writes to a MySQL database.
I'm pretty sure the problem is that the php-A wants to load the php- B instead of just pass it data.
MAIN OBJECTIVE: Flash Post data to a CF or PHP file on a different domain (could be http or https) owned by someone else. Only thing I request the other domain to do is send me back specific values. I cannot load other files on their domain.
Can someone tell me what I'm doing wrong or if I should be going in a different direction here?
Since I don't have access to the cfm file on the separate domain, to test all of this, I'm using a separate domain that I DO have access to that can execute php scripts.
Test 1. I can get the php on server A to send the data to the php on server B just fine (the php on server b is writing to a database). Flash is not involved at all in this test.
Test 2. I can send the data from the Flash file on A to the php file on A just fine.
Test 3. But once I have Flash on A send the data to the php on A, which then sends it to the php on B, nothing appears to be happening as the php is not writing the data it should to a database file.
Flash: uses a sendAndLoad from the Flash to the php with a POST.
php on A: has a form in the php which has hidden fields with the posted data in it. When the php loads, I have a javascript that submits the form.
php on B: receives Posted data and writes to a MySQL database.
I'm pretty sure the problem is that the php-A wants to load the php- B instead of just pass it data.
MAIN OBJECTIVE: Flash Post data to a CF or PHP file on a different domain (could be http or https) owned by someone else. Only thing I request the other domain to do is send me back specific values. I cannot load other files on their domain.
Can someone tell me what I'm doing wrong or if I should be going in a different direction here?