Multiple Servers.. One PHP File.

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!

Moderator: General Moderators

Post Reply
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Multiple Servers.. One PHP File.

Post by Gen-ik »

I have recently created a site for a friend which includes a very basic email form created using Flash.

In order to submit the form from Flash I target a PHP file on my server.

Now, when the site is running from my server (during tests) this works fine, but when the site is run from my friends server Flash doesn't seem to like to target the PHP file (which is still on my server).

I am using the full path to the PHP file (ie http://www.blabalbl ).


Can PHP files be called and/or used if they are not on the same server as the page which is calling and/or using them?

Or is it just a case of his server not being able to use PHP files (even though they are on my sever).



Any thoughts would be good on this because it's going to cause me problems in the future if I can't work in this way.



Thanks.
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

are you trying to include your script into his page? if so this will not produce the desired result. what happens is the script is executed on your server and the output is then included in his script without being processed on his server.
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

What Flash is trying to do is read variables from the PHP script. This works using any kind of document such as .txt files... or .php files.

When Flash reads the PHP files the PHP file executes like any other PHP file would. The final result of the PHP file is that it echo()s a string of variables like this..

username=bob&area=rooma&items=phone

..something like that anyway.

Flash just reads these variables and using them like any other variables you would set in Flash.. you can do some cool stuff working in this way.

I could just include these variables in a .txt file and have it on the same server as the website, but the variables are dynamic, and are created from various MySQL databases, which is why I'm using PHP.


Could it be a security thing, like a Firewall problem?


The problem is the server the website is on can't execute PHP (which is stupid really) which is why the site is on one server, and the PHP file is on another.
Post Reply