iisbetoq
Member
- Joined
- Jul 29, 2013
- Messages
- 36
- Points
- 8
I hope this thread not repost
Examples Case :
I have wordpress blog at hosting A, and i want move to hosting B, so i backup wp-content and sql database. If my wp-content backup size 1GB, i must download it and reupload to hosting B that waste my time, so i use this script code, example this file name is download.php :
put download.php to your live domain then access it ex : http://yourdomainname.com/download.php
thats it, yes just thats it
FYI, this code i got from my friend, but if you have a question feel free to asking here
Best Regards
IisBetoQ
Examples Case :
I have wordpress blog at hosting A, and i want move to hosting B, so i backup wp-content and sql database. If my wp-content backup size 1GB, i must download it and reupload to hosting B that waste my time, so i use this script code, example this file name is download.php :
PHP:
<?php
$saveTo = 'wp-content.zip';// file name
$downloadFrom = 'http://mydomainname.com/wp-content.zip';// Source file
$curl = curl_init();
$fp = fopen($saveTo, 'w');
curl_setopt($curl, CURLOPT_URL, $downloadFrom);
curl_setopt($curl, CURLOPT_FILE, $fp);
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_exec ($curl);
curl_close ($curl);
fclose($fp);
echo 'Transfer Done';
?>
thats it, yes just thats it
FYI, this code i got from my friend, but if you have a question feel free to asking here
Best Regards
IisBetoQ