Solved

Help with PHP upload...

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
php output utf-8 problem 6 52
Joomla Editing 3 24
Sending JSON Via POST In PHP 7 32
Allow the whole div to submit form not just button 2 14
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
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 i…
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 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…

710 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