0

i know with a PHP script i can upload files to a another server via FTP protocol.

But is it possible to upload a file to a another server by using the HTTP protocol?

I mean, that i change the folderpermissions to linux-"777" and my php script can upload a file directly in this folder by using username and password e.g.?

Is this possible or works this only with FTP protocol?

1

1 Answer 1

1

HTTP doesn't work that way. For uploading a file to another server using HTTP there should be a script on that server that accepts the file and puts it to a particular directory.

So from your side you need to send POST request, and on that side there should be a script that handles it.

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

3 Comments

I was answering in general, he could extend his question, so we can raise the but's :) it's even possible to upload file via "AJAX" over http.. but yeah, a question must be more focused on a particular problem.
Okay, i also need a script on the other side, thats accepts my uploading file via http.
@Fratyr: especially this part of the original question "my php script can upload a file directly in this folder by using username and password" prevents me from saying strict yes :-) Because sender doesn't have ability to control where the file will be uploaded (in a contrast with FTP, where it's possible)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.