0

i can't find out how to save XML file to remote web server using PHP DOM.

I tried with $dom->save('http://www.somedomain.com/file.xml'); but without success. I've set permissions of 'file.xml' on remote server to 777 but that doesn't helps.

1 Answer 1

3

You can't write to a URL, unless the server supports WebDAV or the like. You'd need a script on the server which accepts http file uploads and processes them from there.

As to why this doesn't work, imagine how fun the web would be if anyone could save files to whatever URL they wanted.

Sign up to request clarification or add additional context in comments.

1 Comment

Dear Marc B, I tried something with upload scripts but unfortunately i spent 4 hours screwing with cURL library and at the end i had to use different approach in solving this problem -> i've simply used ftp_put commands to send xml file from one server to another so i could overwrite another one.. Thanks anyway!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.