Solved

Help with PHP upload...

Posted on 2008-06-18
4
215 Views
Last Modified: 2008-07-01
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!
0
Comment
Question by:frankmorrison
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 48

Expert Comment

by:hernst42
ID: 21819567
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
 
LVL 1

Author Comment

by:frankmorrison
ID: 21825198
The file is on Server_A.  I simply need a php script that will move a file from Server_A to Server_B.
0
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
ID: 21825230
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
 
LVL 1

Author Comment

by:frankmorrison
ID: 21877885
hernst42

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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Log in through ID 5 36
AJAX Wordpress Not Reading Variable 2 56
htaccess block all countries but the US 4 35
Why is my $_POST not going to results page 10 35
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question