How to Create a PHP URL Remote File Uploader Script?

In this tutorial, we will show you how you can transfer your files, backups from one server to another server just providing the file URL in the script.

Note: Use this script at your own risk, this script may produce high server load, so your hosting provider may suspend your account for that.

1. For example, you may transfer a file from hosting1 to hosting2, so login to your hosting2 account and create a file in your file manager and name it “upload.php” make sure your both hosting account have activate domain name connected, this is required to properly work the script.

2. Now edit your recently created file upload.php and input the below code and save.

<?php exec(“wget http://hosting1.com/path-to-file.zip”); ?>

Here replace the URL with your file which you would like to transfer from hosting1 to hosting2.

3. Now navigate to your file you created in step 1 in your browser, so it might be: http://hosting2.com/upload.php

4.Wait. The page might return a 500 error or blank, thats OK, the wget command should still go through.

5. In your file manager reload the directory where you put upload.php, you will see the file there waiting for you. Done!

Note: This is highly insecure as any bot or person could just request your upload.php file, so make sure you delete it after your done.

Was this helpful?

1 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *