Activity Stream
48,167 MEMBERS
6843 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1.     
    #1
    Member
    Website's:
    WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.pro

    Default Need Help In cURL Progressbar

    i need a progress bar for my downloader script,my script is curl based and its saving files using cul file function,and i don't have knowledge about progressbar,guys please help me.i need it urgent.

    What I Need?
    Ans: every 5 sec it will update the status of trasfer,like how much downloaded in 5 sec/total size and then status of 10 sec count......or in %
    saninokia Reviewed by saninokia on . Need Help In cURL Progressbar i need a progress bar for my downloader script,my script is curl based and its saving files using cul file function,and i don't have knowledge about progressbar,guys please help me.i need it urgent. What I Need? Ans: every 5 sec it will update the status of trasfer,like how much downloaded in 5 sec/total size and then status of 10 sec count......or in % Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    wautoposter.com
    pm me your code i will add progressbar

  4.     
    #3
    Member
    Website's:
    WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.pro
    just tell me bro i will do it myself,i want to config it myself.

  5.     
    #4
    Member
    Website's:
    dota2lounge.com
    i did that with filesize(), curl_getinfo() (before dl start), and with html5 <progress>

  6.     
    #5
    Member
    Website's:
    WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.pro
    Quote Originally Posted by borewik View Post
    i did that with filesize(), curl_getinfo() (before dl start), and with html5 <progress>
    You Can Show Me The Code?

  7.     
    #6
    Member
    Website's:
    dota2lounge.com
    Getting size of whole file:
    PHP Code: 
    $ch curl_init();
    curl_setopt($chCURLOPT_URL"http://www.dsa.da/urfile.rar");
    curl_setopt($chCURLOPT_NOBODY1);
    curl_setopt($chCURLOPT_RETURNTRANSFER0);
    curl_setopt($chCURLOPT_FOLLOWLOCATION1);
    curl_exec($ch);
    $info curl_getinfo($ch);
    $maxSize $info['download_content_length']; 
    $info is an arrays. print_r it so you can check what it contains.

    Upadaing every 5 sec i did in JS, its just ajax request of file:
    PHP Code: 
    echo filesize("urfile.rar"
    That ajax request update value of html5 tag:
    Code: 
    <progress max="<?php echo $maxSize ?>" value=""></progress>
    I didnt post my whole scripts because its part of something bigger. Anyway hope it help

  8.     
    #7
    Member
    Website's:
    imdber.org justpaste.me
    Check CURLOPT_PROGRESSFUNCTION if on 5.3

  9.     
    #8
    Member
    Website's:
    WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.pro
    the problem is,i am getting total size of file,and how much downloaded,but how to update it every 5 sec?

  10.     
    #9
    Member
    Website's:
    sborg.us
    ^^ By adding a while loop with a sleep of 5 seconds and a condition to stop the loop when the download completes?

    V3g3ta | Halcyon | Abhi

  11.     
    #10
    Member
    Website's:
    dota2lounge.com
    yep like halcyon, and me before said. do that in javascript
    things you need:
    Code: 
    setTimeout(function() {
    // here your ajax request
    },5000);
    and about request - google that if u dont know:
    jQuery.ajax()

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Curl to Uploaded.to
    By skinner in forum Web Development Area
    Replies: 18
    Last Post: 12th Feb 2012, 07:05 AM
  2. Curl url file (I need help)
    By spanero in forum Web Development Area
    Replies: 3
    Last Post: 22nd Dec 2011, 04:23 PM
  3. Curl IPB help
    By xwarlordx in forum Web Development Area
    Replies: 3
    Last Post: 23rd Aug 2011, 06:33 AM
  4. cURL Pro Coders.
    By kohkindachi in forum Completed Transactions
    Replies: 2
    Last Post: 5th Dec 2010, 12:30 AM
  5. How to install CURL in WHM
    By ken in forum Technical Help Desk Support
    Replies: 2
    Last Post: 22nd Sep 2010, 01:46 PM

Tags for this Thread

BE SOCIAL