loading

How to remotely upload a file in cPanel via link or URL

Updated at
14/11/2022
Views
7367

Introduction:

In today's article, I will guide you, How to remotely upload a file in cPanel via link or URL. So let's get started.

  • Firstly, go to your cPanel account, and then login.
  • After that, find out the Files section, and then here you can see the File Manager option.
  • Simply click on it, and then go inside to the public_HTML. So now here you need to create a file with the name of testing.php.
  • So now select your created file and then right click on it.
  • Here you can see the Edit option, So simply click on it, and then again click on edit button.
  • So now enter the following code inside the file, and don't forget to replace the URL with your custom URL that you would like to download.
  • Once you're done, then click on this Save Changes button, and then your file has been saved.
  • So now search the URL from outside, and then it will automatically download the URL content.
  • Now reload the directory, and then check the downloaded content in public_HTML.

<?php
define('BUFSIZ', 4095);
$rfile = fopen($url, 'r');
$lfile = fopen(basename($url), 'w');
while(!feof($rfile))
fwrite($lfile, fread($rfile, BUFSIZ), BUFSIZ);
fclose($rfile);
fclose($lfile);
?>

YottaSrc footer

why choose us?

Better Pricing, Fast SSD Storage and Real 24/7
Technical Support.

control panel icon
cPanel

Managing Your Site Through CPanel With The Latest Version

security icon
FAST, RELIABLE & SECURE

99.8% Uptime Guarantee.
So Focus On Your Work!

support icon
24/7/365 Support

Day or night, rain or shine,
our team is here for you!

cloud backup icon
Daily Backup

Daily & Weekly Backup.
Your Files Are Safe!