How to upload zip file directly from URL to cPanel using PHP
June 4, 2016
To upload zip file directly from URL to cPanel using PHP, follow these steps:
1. Create a new file php at root folder named getzip.php, where we can access on our domain. Eg:- ../public_html/getzip.php
2. Next edit the getzip.php file in the file manager, and put below code:
<?php exec("wget http://domain.com/path-to-file/file-name.zip"); ?>
3. Now open the file in the browser, so it might be http://domain.com/getzip.php
4. We should wait now, no worry if 500 error there, the wget command being execute.
5. Now reload the directory in cPanel where you put getzip.php, you will see that file.
By using these steps your file upload quickly from URL to cPanel.