How to POST a file without a form?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dimetrius
    New Member
    • Apr 2011
    • 1

    How to POST a file without a form?

    Suppose we have a form at server, say, http://www.b.com/ (let's call it server Â):
    Code:
    <form action="/" method="post" enctype="multipart/form-data">
    <input name=file type=file size=20>
    <input type=submit name=submit value="Load">
    </form>
    for uploading files to server B for their further processing with final result shown at the browser.
    Next, we have a file xxx.txt at server http://www.a.com/ (let's call it server À). The question is: how must the php-script (file at server A) look like to make it possible to send file xxx.txt to server B (instead of and without the mentioned form) and show the proper result in a browser window?
Working...