Help with PHP upload...

I need to transfer an existing file from "Server_A" to "Server_B" when web visitor clicks on a button inside a php page served by "Sever_A".

"Server_B" already has an ASP script that receives files via standard http post.

In fact, on "Server_A", we already have a page that allows users to choose a local file:

<FORM NAME="myform" METHOD=POST ENCTYPE="multipart/form-data" NAME="SENDFILE" ACTION="http://SERVER_B/upload.asp">
<input type=file name="file1">
<input type="submit" name="dosubmit" value="Send File" accept="image/jpg, image/gif">

So, I thought about this: <input type=file name="file1" VALUE="myfile.jpg"> but it didn't work.

Help!
LVL 1
frankmorrisonAsked:
Who is Participating?
 
hernst42Connect With a Mentor Commented:
You can use the curl extension to post files from server a to server be.
See example 2 on http://www.php.net/manual/en/function.curl-setopt.php
0
 
hernst42Commented:
IS that file onthe local computer of the user or on Server A?
If it's on the users computer then there i no way to have an default.
0
 
frankmorrisonAuthor Commented:
The file is on Server_A.  I simply need a php script that will move a file from Server_A to Server_B.
0
 
frankmorrisonAuthor Commented:
hernst42

Are there any simple working samples you can give me?
0
All Courses

From novice to tech pro — start learning today.