1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

[Ask] Mau tanya ni Script Download To Hosting

Discussion in 'Pemrograman Web' started by fauziku, Feb 4, 2018.

Tags:
  1. fauziku

    fauziku Yang penting Jujur

    Joined:
    Nov 27, 2011
    Messages:
    646
    Likes Received:
    203
    Location:
    dunia maya
    Halo agan agan, mau tanya ni.. !!
    ada yg punya ngak Script Download To Hosting ? jadi file yg kita download bukan ke pc tp langsung ke hosting kita biar ngak harus upload lagi..kan capek klo download upload hosting ! Maren sempat nyimpan scriptnya nemu di groups fb, tp lupa simpan dmn,,hehe !

    Makasih yg mau share !
     
  2. ubaydil

    ubaydil Hero

    Joined:
    Oct 6, 2015
    Messages:
    716
    Likes Received:
    151
    Location:
    Malang, Jawa Timur
    Download apa nih bang?

    Bisa pakai fungsi php file_put_contents()

    Lengkapnya ada disini https:// stackoverflow . com/questions/3938534/download-file-to-server-from-url
     
  3. fauziku

    fauziku Yang penting Jujur

    Joined:
    Nov 27, 2011
    Messages:
    646
    Likes Received:
    203
    Location:
    dunia maya
    Tq...tkp, download file yg agak besar2
     
  4. hendranata

    hendranata Hero

    Joined:
    Jul 7, 2015
    Messages:
    623
    Likes Received:
    20
    Location:
    Surabaya
    jadi inget rapidleech..
    bisa pake itu om..ga tao gmn kabarnya itu.
    atau bisa pake wget di cron
     
  5. iisbetoq

    iisbetoq Super Hero

    Joined:
    Jul 13, 2011
    Messages:
    2,596
    Likes Received:
    203
    Location:
    0727-0737
    sebener nya udah pernah ada yg posting, mungkin si om kelewatan form search nya :D
    kalo pake vps, ketik wget namahosting/namafile.zip
    kalo pake shared berikut kode nya (copas arsip forum)
    PHP:
    <?php
    $saveTo 
    'wordpress.zip';// ini nama file kita
    $downloadFrom 'https://wordpress.org/latest.zip';// ini URL download dari mana

    $curl curl_init();
    $fp fopen($saveTo'w');
    curl_setopt($curlCURLOPT_URL$downloadFrom);
    curl_setopt($curlCURLOPT_FILE$fp);
    curl_setopt($curlCURLOPT_USERAGENT$_SERVER['HTTP_USER_AGENT']);
    curl_exec ($curl);
    curl_close ($curl);
    fclose($fp);
    echo 
    'SELESAI';
    ?> 
    cara pakai nya, upload script ini di hosting baru, misal sedot.php, jadi nya domainbaru.kom/sedot.php
     
  6. The Gamer

    The Gamer AdSense Fan

    Joined:
    Sep 12, 2017
    Messages:
    213
    Likes Received:
    11
    Izin menaruh jejal gan
     
  7. fauziku

    fauziku Yang penting Jujur

    Joined:
    Nov 27, 2011
    Messages:
    646
    Likes Received:
    203
    Location:
    dunia maya
    Makasih suhu..sangat berhasil
     
  8. unmetered.co.id

    unmetered.co.id New Comer

    Joined:
    Dec 11, 2017
    Messages:
    11
    Likes Received:
    0
    Mantap...
     

Share This Page