Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Download a file from external server using PHP - Move one project to another server

<?php
// It will copy one server file to another server and beleive me, 
// it would jist take 1 second for 100MB file. 
// May be for 1GB = 10 seconds highest. 
// It's very useful to move cPanel file to another cPanel server
  
// Create a file download.php in current server.
file_put_contents("download.zip", fopen("file_url", 'r'));

// Example would be
ini_set ('max_execution_time', -1); //unlimited execution 
ini_set('memory_limit', '-1'); //unlimited memory 

file_put_contents("download.zip", fopen("https://another.com/project.zip", 'r')); // https://another.com/project.zip is the file stored in another server with read access

// Then Just browse the file from current server, where needs to be added
// https://current.com/download.php

// And Boooooooooooom !!!! Go to current server and check copy of the
// Previous server file has been added in this server.

?>
Comment

PREVIOUS NEXT
Code Example
Php :: woocommerce redirect shop page 
Php :: magento 2 get connection 
Php :: php convert words with spaces to camelcase 
Php :: wordpress user enumeration 
Php :: laravel model to array 
Php :: cast array to object php 
Php :: laravel migration change column name 
Php :: laravel get random row 
Php :: php get ip address 
Php :: laravel eloquent search query 2020 
Php :: attach multiple files in laravel mailable 
Php :: laravel where creation is today carbon 
Php :: laravel order by raw 
Php :: if is cart page woocommerce 
Php :: livewire pagination bootstrap 
Php :: php artisan migrate reset 
Php :: how to get javascript variable value in php 
Php :: php sql connection string 
Php :: full name validation laravel 
Php :: codeigniter 4 pagination descending 
Php :: regex to check date format php 
Php :: check if date between two dates laravel eloquent 
Php :: laravel throw exception with status code 
Php :: get contents of a tmp file php 
Php :: make model controller in single command 
Php :: how to setup cronjob on cakephp on share hosting 
Php :: laravel json 
Php :: php mysql datetime format string 
Php :: auto scroll down in javascript 
Php :: how to do laravel in sidebar active menu dynamic blade 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =