Solved

Help with PHP upload...

Posted on 2008-06-18
4
202 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
  • 2
  • 2
4 Comments
 
LVL 48

Expert Comment

by:hernst42
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
hernst42

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

Featured Post

Easy Project Management (No User Manual Required)

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

772 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now