xwishmasterx Posted September 10, 2011 Share Posted September 10, 2011 Hello I am in need of writting to a txt file on a remote server. When trying I get this error: "failed to open stream: HTTP wrapper does not support writeable connections in /home....." How can I write to a siply txt file on a remote server? Quote Link to comment https://forums.phpfreaks.com/topic/246865-writing-to-a-remote-txt-file/ Share on other sites More sharing options...
premiso Posted September 10, 2011 Share Posted September 10, 2011 Impossible to do without that functionality built in. If you have a php script that you can connect to write to it. But would need to be coded for an api-key if not it could be exploited easily. Or you can use SSH / FTP. But you have to have some type of functionality to allow the write method as http on it's own is generally read only. Quote Link to comment https://forums.phpfreaks.com/topic/246865-writing-to-a-remote-txt-file/#findComment-1267829 Share on other sites More sharing options...
xwishmasterx Posted September 11, 2011 Author Share Posted September 11, 2011 thanks for the answer. I am amazed that writing to a remote file is so difficult to setup. Quote Link to comment https://forums.phpfreaks.com/topic/246865-writing-to-a-remote-txt-file/#findComment-1267966 Share on other sites More sharing options...
jcbones Posted September 11, 2011 Share Posted September 11, 2011 Why? if it were easier, then every kiddie on the interwebz would be changing all of your files! Quote Link to comment https://forums.phpfreaks.com/topic/246865-writing-to-a-remote-txt-file/#findComment-1267976 Share on other sites More sharing options...
xyph Posted September 11, 2011 Share Posted September 11, 2011 There are many services specifically designed to do this. It's not difficult. FTP functions are built directly in to PHP Quote Link to comment https://forums.phpfreaks.com/topic/246865-writing-to-a-remote-txt-file/#findComment-1268050 Share on other sites More sharing options...
jcbones Posted September 11, 2011 Share Posted September 11, 2011 My suggestion would be to have a script on the remote server that accepted a POST, and then write to the file on its own server. Quote Link to comment https://forums.phpfreaks.com/topic/246865-writing-to-a-remote-txt-file/#findComment-1268073 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.