Krash Posted August 25, 2011 Share Posted August 25, 2011 Is it possible to allow a script running on another server to write/read a specific file on my server? I can set file permissions, but not having any luck with file paths due to php5 blocking http:// urls. Quote Link to comment https://forums.phpfreaks.com/topic/245712-file-access-from-another-server/ Share on other sites More sharing options...
xyph Posted August 25, 2011 Share Posted August 25, 2011 Use FTP functions, perhaps? Quote Link to comment https://forums.phpfreaks.com/topic/245712-file-access-from-another-server/#findComment-1262042 Share on other sites More sharing options...
trq Posted August 26, 2011 Share Posted August 26, 2011 You cannot write using simple http. You would need to setup webdav. otherwise, your going to need to look down the path of other protocols. ftp, ssh etc etc. Depending on what it is your doing, it might be better to provide an API the client can send data to. Quote Link to comment https://forums.phpfreaks.com/topic/245712-file-access-from-another-server/#findComment-1262104 Share on other sites More sharing options...
Krash Posted August 26, 2011 Author Share Posted August 26, 2011 Tried using ftp:// wrapper, but get the same error - 'URL file-access is disabled in the server configuration'. I'm actually trying to do something that appears very simple, and been working on it on/off since beginning of the year. I'm building a verification widget that runs in an iframe on the SMF registration form. I'd like to keep it in the widget, so all users would be loading it off my server, but haven't found a good way to pass the verification code from the iframe to the SMF form handler. Session variables don't work, because the iframe and SMF are running different sessions. I can use a cookie locally, but it won't work on a user's forum because the cookie is set from the iframe (my domain), and must be read by the user's domain. The fallback is to write a verification code (0 or 1) to a text file, and have the SMF form handler open the file and read the code. This also works locally, but it requires either having the widget write the text file on the user's server, or allowing the user to read the file off my server. That's what I'm working on tonight - need a script that will run in the user's domain/server, and open/read/delete the file from my domain/server. Quote Link to comment https://forums.phpfreaks.com/topic/245712-file-access-from-another-server/#findComment-1262120 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.