Visualizzazione dei risultati da 1 a 4 su 4

Discussione: Limitare download curl

  1. #1
    Utente di HTML.it
    Registrato dal
    Jun 2003
    Messaggi
    451

    Limitare download curl

    Mi chiedevo... è possibile limitare la velocità di download con curl?

    cioè... io non voglio utilizzare tutta la banda che ho a disposizione ma solo la metà... è possibile?

    Grazie.

  2. #2
    no ci vuole qualcosa che ti limiti la banda... o software o hardware
    IP-PBX management: http://www.easypbx.it

    Old account: 2126 messages
    Oldest account: 3559 messages

  3. #3
    Utente di HTML.it
    Registrato dal
    Jun 2003
    Messaggi
    451
    Grazie lo stesso... provo a fare qualcosa sul server.

  4. #4
    se non usi le curl ma ti scrivi il downloader da solo si mentre per quanto riguarda le curl "forse"

    se non erro le curl hanno un meccanismo per notificare una funzione ogni qual volta scaricano un pacchetto di dati quindi se li ci metti uno sleep potrebbe (con molti punti interrogativi) funzionare

    value should be a string that is the name of a valid callback function for the following values of the option parameter:

    Option Set value to Notes
    CURLOPT_HEADERFUNCTION The name of a callback function where the callback function takes two parameters. The first is the cURL resource, the second is a string with the header data to be written. The header data must be written when using this callback function. Return the number of bytes written.
    CURLOPT_PASSWDFUNCTION The name of a callback function where the callback function takes three parameters. The first is the cURL resource, the second is a string containing a password prompt, and the third is the maximum password length. Return the string containing the password.
    CURLOPT_PROGRESSFUNCTION The name of a callback function where the callback function takes three parameters. The first is the cURL resource, the second is a file-descriptor resource, and the third is length. Return the string containing the data.
    CURLOPT_READFUNCTION The name of a callback function where the callback function takes two parameters. The first is the cURL resource, and the second is a string with the data to be read. The data must be read by using this callback function. Return the number of bytes read. Return 0 to signal EOF.
    CURLOPT_WRITEFUNCTION The name of a callback function where the callback function takes two parameters. The first is the cURL resource, and the second is a string with the data to be written. The data must be written by using this callback function. Must return the exact number of bytes written or this will fail.
    Potresti provare ad usare o la CURLOPT_READFUNCTION o la CURLOPT_WRITEFUNCTION, in ogni caso guarda nei commenti per vedere se qualcuno le ha utilizzate o guarda su google

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.