تحميل

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

Updated at
14/11/2022
Views
6948

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

لماذا تختارنا؟

أفضل الأسعار, تخزين SSD سريع و دعم فني
24/7 حقيقي

control panel icon
cPanel

إدارة موقعك من خلال CPanel بأحدث إصدار

security icon
سريع وموثوق وآمن

ضمان وقت تشغيل بنسبة 99.8٪.
لذا ركز على عملك!

support icon
دعم 24/7/365

ليلاً أو نهارًا ، مطر أو شمس ،
فريقنا هنا من أجلك!

cloud backup icon
نسخ احتياطي يومي

نسخ احتياطي يومي وأسبوعي.
ملفاتك آمنة!