Skip to content
Advertisement

How to send file from PHP-script to another PHP-script in code?

I have some web-form which posts some data and user file to first php script.
First script wants to upload received from form file which located at $_FILE variable to second php script (second script wants receive file in $_FILE variable too).

How can I make this?

P.S. Second script located on another web-server.

Advertisement

Answer

Try use a curl.
For example: http://dtbaker.com.au/random-bits/uploading-a-file-using-curl-in-php.html

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement