I have a web application “A” which generates config files for another application “B”.
I must be able to transfer this config files by a FTP connection.
“A” and “B” are not on the same network so I have to store the config files made by “A” on my local device (a tablet).
“A” is used with multiple devices. With the iPad (no classical file system) I can’t download and store the config files and then upload them to “B”.
So I store the config files in the cache of safari and I am able to display them on the tablet even when I am not connected to the network of “A” (with a href of the url in cache).
However when I try to do a “fopen” in the php code with this same url I get this message “failed to open stream: No connection could be made because the target machine actively refused it.”
I don’t understand why I’m able to display a file that I can’t open in the code …
Thanks !
PHP only has access to the filesystem on the server, not on the device (PHP itself does not execute on the device, it only produces output for a device, by the time the device “gets” it, PHP is finished executing). The reason you are getting the connection refused error is the same reason you need a man-in-the-middle in the first place; A cannot talk to B.
Depending on how much control you have over some of these things, here are my ideas: