Solved

Help with PHP upload...

Posted on 2008-06-18
4
217 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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

617 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