Adult Script Pro Community Forums

Create, help and share your ideas with the community!

You are not logged in.

#1 2017-04-16 17:36:59

happylag
Member
Registered: 2016-04-05
Posts: 154

Limit download speed

Hello,

Let's say you don't convert videos, you just copy them from graber. How to limit the download speed from the tube source? ( let's say xhamster ).

Thank you.

Offline

#2 2017-04-17 19:17:08

symtab
Administrator
Registered: 2010-08-23
Posts: 7,375
Website

Re: Limit download speed

You could do this by modifying the libraries/framework/curl.php file and add use:

curl_setopt($ch, CURLOPT_MAX_RECV_SPEED_LARGE, 10240);

to limit the download speed...


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - PopAds

Offline

#3 2017-04-18 16:55:50

happylag
Member
Registered: 2016-04-05
Posts: 154

Re: Limit download speed

Where should i add it exactly in this file?

Also it will just limit the download speed from the tube source to the media server, not the users download speed of the videos on my site, right?

Thank you.

Last edited by happylag (2017-04-18 17:16:53)

Offline

#4 2017-04-19 07:30:38

symtab
Administrator
Registered: 2010-08-23
Posts: 7,375
Website

Re: Limit download speed

Yes, it will limit the download speed for the files that are being downloaded on your server (by the graber). Edit libraries/framework/curl.php and add:

curl_setopt($ch, CURLOPT_MAX_RECV_SPEED_LARGE, 10240);

after

        $ch = curl_init();
        $fh = fopen($file, 'w');
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_FILE, $fh);
        curl_setopt($ch, CURLOPT_HEADER, FALSE);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, CURL_TIMEOUT);
        curl_setopt($ch, CURLOPT_VERBOSE, CURL_VERBOSE);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
        curl_setopt($ch, CURLOPT_NOPROGRESS, CURL_PROGRESS);
        curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071204 Ubuntu/7.10 (gutsy) Firefox/2.0.0.11');

Please note that you need a recent version of curl and php. Also i never tested this on freebsd.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - PopAds

Offline

Board footer

Powered by FluxBB