Labels

php (35) javascript (31) phpjavascript (30) jquery (23) html (20) mysql (14) database (9) codeigniter (4) json (4) bar chart (2) calendar (2) column chart (2) framework (2) google maps (2) query (2) tables (2) url (2) dropdown (1)

Monday, May 28, 2018

Download file with speed limit using PHP

Here we are explaining about how to limit speed for the file download operation.


<?php
// File form server
$local_file = 'user.php';

// filename that the user gets as default
$download_file = 'myFile.php';

// set the download rate limit (=> 10 kb/s)
$download_rate = 10;

if(file_exists($local_file) && is_file($local_file)) {

    // send headers
    header('Cache-control: private');
    header('Content-Type: application/octet-stream');
    header('Content-Length: '.filesize($local_file));
    header('Content-Disposition: filename='.$download_file);

    // flush content
    flush();

    // open file stream
    $file = fopen($local_file, "r");

    while (!feof($file)) {

        // send the current file part to the browser
        print fread($file, round($download_rate * 10));

        // flush the content to the browser
        flush();

        // sleep one second
        sleep(1);
    }

    // close file stream
    fclose($file);
}
else {
    die('Error: The file '.$local_file.' does not exist!');
}
?>

For more:

Unknown Features
Beautiful Designs
Security Features

71 comments:

  1. Thank for your writting! I have read through some similar topics! However, your post has given me a very special impression, unlike other posts. I hope you continue to have valuable articles like this or more to share with everyone!
    link access to register here:
    duck life 3
    vex 3
    fnaf

    ReplyDelete
  2. This article is very nice.
    If you are facing problems How To Refund In QuickBooks, then you can directly contact QuickBooks Online Support +1-877-249-9444.

    ReplyDelete
  3. Buy Malegra 100mg Online From Trusted online pharmacy Medypharma. Malegra 100mg The drug contains sildenafil citrate. Buy Generic Sildenafil citrate at Lowest Price Online ✅. malegra 100 for sale, malegra 100 pro review. cheap Malegra 100 from your reliable pharmacy.

    ReplyDelete
  4. Buy Malegra 200mg Online belongs to containt of Sildenafil Citrate . Know More about Malegra 200 mg price , uses , How to use , How to take . cheap generic Viagra from this online pharmacy Medypharma, get great discounts and home delivery. Order Now! buy malegra online , cheap malegra 100

    ReplyDelete
  5. Buy Super Kamagra Online is a combination medication consisting of Sildenafil Citrate 100 mg and Dapoxetine Hydrochloride 60 mg. Sildenafil is used to treat erectile dysfunction. Know about super kamagra uses , Price , How to take , Side Effect , How to use .cheap kamagra from Online Trusted Pharmacy Medypharma.

    ReplyDelete
  6. Interesting post! I really amazed to read the great information. You have shared best quality stuff in the content of the post. Thank you so much for such an awesome blog post!

    ReplyDelete
  7. Buy Vidalista Professional Online is an FDA-approved medicine used to treat erectile dysfunction problems in men.Know about vidalista uses , Price , How to take , Side Effect , How to use. vidalista professional 20 review from Trusted Online Pharmacy Medypharma.

    ReplyDelete
  8. Buy Vidalista Professional Online is an FDA-approved medicine used to treat erectile dysfunction problems in men.Know about vidalista uses , Price , How to take , Side Effect , How to use. vidalista professional 20 review from Trusted Online Pharmacy Medypharma.

    ReplyDelete
  9. BuyKamagra Gold 100mg Online is used for Enlarged prostate gland in male, Increased blood pressure in lungs and other conditions. Know about the uses, side effects, price, composition, substitutes, How it works, Lowest Price Online. Kamagra Gold 100mg Online buy with lowest Price Ever Online Pharmacy. Kamagra Gold 100mg Reviews.

    ReplyDelete
  10. I for one feel that you should cotinue in the Bio tech field as it holds immence prospects what with the growing concern for environment.
    seo services

    ReplyDelete
  11. Buy Silagra 100mg Online is used for Penis erection, High blood pressure and other conditions. Silagra 100mgTablet may also be used for purposes not listed in this medication guide. Order Silagra 100mg Online From Trusted Online Pharmacy Medypharma . Best Price In USA.

    ReplyDelete
  12. Buy Tadarise oral Jelly Online is FDA Approved Medication use to Men with erectile dysfunction. Tadarise 20 Oral jelly manufactured by Sunrise Remedies in india. cheap tadalafil oral jelly buy at online trusted pharmacy Medypharma. Tadarise Oral jelly reviews , Lowest Price Online. Order Now !

    ReplyDelete
  13. BuyForzest 20mg Online is used for Enlarged prostate gland in male, Increased blood pressure in lungs and other conditions. Know about the uses, side effects, price, composition, substitutes, How it works, Lowest Price Online. Forzest 20mg Online buy with lowest Price Ever Online Pharmacy. Forzest 20mg Reviews.

    ReplyDelete
  14. Buy Cenforce Professional Online is a fast-acting medication that can last up to four hours. cenforce professional 100mg is manufactured by Centurion Lab. Buy generic drugs from this Trusted online pharmacy Medypharma. Free home delivery on Order above $249 ! cenforce 100mg reviews.

    ReplyDelete
  15. Buy Tenvir 300mg Online is a drug used to treat HIV in combination with other drugs. Tenvir 300 mg price in india manufactured by Cipla Inc, Buy Tenvir 300 mg online from Medypharma - your most dependable online pharmacy. Order Now!

    ReplyDelete
  16. Buy Erlonat 100mg Online is prescribed to patients suffering from metastatic lung cancer which is at a very advanced stage. erlotinib tablets 150 mg price in india, erlonat 150 price, side effects, review

    ReplyDelete
  17. Buy Temonat 250mg Online is used in the treatment of brain tumor. Temozolomide 250 mg Capsule is used to treat specific types of brain cancer, including. Buy Temonat 250 mg from trusted inline Pharmacy Medypharma.

    ReplyDelete
  18. Buy Aromasin 25mg Online Tablet is used in the treatment of early stage breast cancer in postmenopausal women. Know more about Aromasin for sale, price, dosage, cost, steroids, side effects, bodybuilding. Aromasin25 mg pfizer.

    ReplyDelete
  19. Try to find foam sleeping mats for camping. Got mine at Walmart. They are about 1/2" thick, so for some tools, or things that you want really close together, you may want to double it up and not cut all the way through.

    Joe Davies

    ReplyDelete
  20. Buy MyHep 400mg Online is an antiviral medicine used in the treatment of chronic hepatitis C infection. Myhep 400mg price, side effects, dosage, Uses from your most reliable Trusted online pharmacy Medypharma. by your doorsteps, Avail best price in USA.

    ReplyDelete
  21. BuyPPG 0.2mg Online is used to lower blood glucose level in patients with Type 2 Diabetes Mellitus. Buy PPG 0.2 mg side effects, price, Dosage, Uses. PPG Tablets Diabetes. cheap PPG 0.2mg from Medypharma. Order Now.

    ReplyDelete
  22. Buy Fildena Super Active Online This medication is helpful for men that have erection problems. The main ingredient of this brand is Sildenafil Citrate. Sildenafil Citrate acts by improving the performance of enzyme by boosting up the flow of blood into the main organ. Thus, preventing the erection disability and producing.

    ReplyDelete
  23. Buy Fliban 100mg Flibanserin Online Generic Flibanserin (Fliban Tablets) is used to treat decreased sexual desire (Hypoactive Sexual Desire Disorder, Acquired and Generalized) in women who have not gone through menopause and who have never experienced low sexual desire earlier.

    ReplyDelete
  24. I really like your blog.. very nice colors & theme. Did you design this website yourself or did you hire someone to do it for you? Plz reply as I'm looking to construct my own blog and would like to find out where u got this from. thanks a lot Exide battery dealers in Chennai

    ReplyDelete
  25. I'm still learning from you, as I'm trying to reach my goals. I absolutely liked reading everything that is written on your post.Keep the tips coming. I loved it! seo jobs in singapore

    ReplyDelete
  26. participate in fildena 100mg sale online
    find out the fildena 100mg price without help
    know the manufacturing of fildena 100mg usa
    know the production of fildena 100mg in india
    get the instruction of fildena 100 mg uk


    Suhagra Force 50 Tablet for Premature Ejaculation
    give some useful suhagra force 50 reviews online at home
    get some information about suhagra force 50 mg online
    is suhagra 50 for female and children too?
    list the <a href="https://www.strapcart.com/product/buy-suhagra-force-50-online/>suhagra 50 mg price</a> from anywhere

    ReplyDelete
  27. I am very enjoyed because of this blog. Its an informative topic. It help me quite definitely to resolve some problems. Its opportunity are very fantastic and working style so speedy.
    digital courses singapore

    ReplyDelete
  28. Buy Tadarise 5mg Online (generic Cialis) are used to treat erectile dysfunction (impotence) in men. Tadarise 5 mg online from Trusted Online Pharmacy Medypharma. Cheap Tadarise online in USA. by your doorsteps , Order Now! . Generic cialis online , cheap cialis in USA.

    ReplyDelete
  29. Buy Tadalista 10mg Online is containt of Tadalafil. your most reliable Trusted online pharmacy Medypharma. Avail best price in USA, by your doorsteps. Order Tadalista 10 Now! , buy Tadalista online , tadalista india , tadalista price.

    ReplyDelete
  30. which is a immature share of the issues a lot of people unrecorded with sect now, but but making improved lives for group that's direction on feat them much , getting them punter aid and making certain their kids get enlightened.
    social media management

    ReplyDelete
  31. Buy Tadarise 20mg Online is a name for generic Cialis, an erectile dysfunction medication based on Tadalafil. Tadarise comes in different strengths, unlike many other Tadalafil-based drugs that only come in 20mg pills. The primary purpose of this medication is to assure a firm, lasting erection to men who generally have problems gaining and maintaining it or who have been diagnosed with impotence.

    ReplyDelete
  32. Buy XBIRA 250mg Online belongs to the group of medications called antineoplastics, or product medications. It contains a medicine called Abiraterone Acetate. It is a prescription medicine that can be purchased by a patient only against a valid prescription of a healthcare professional. Do not share this cancer medicine with others because it can cause serious side effects to people until the condition is not monitored by a pharmacist.

    ReplyDelete
  33. Buy Temoside 100mg Online is an product oral drug. It is used in chemotherapy. It is categorized as an alkylating agent. Temoside 100Mg Capsule is used in the treatment of anaplastic and glioblastoma multiforme. On using Temoside 100Mg Capsule you may experience side effects such as nausea, constipation, headache, weakness, paleness, reduced appetite, hair loss, low cognitive and memory skills and vomiting. Seek the help of your health care provider if your reactions persist and keep worsening over time.

    ReplyDelete
  34. Buy Anastronat 1mg Online is used along with other therapies in the treatment of breast cancer in postmenopausal women. This medicine is also used to treat women whose breast cancer has worsened after tamoxifen therapy.

    ReplyDelete
  35. Good post. I learn something more difficult on totally different posts everyday. It can always be stimulating to read content material from other writers and observe a bit one thing from their store. I’d desire to make use of some with the content on my post whether or not you don’t mind. Natually I’ll give you a hyperlink in your net post. Thanks for sharing. alexa singapore

    ReplyDelete
  36. Hi there, I found your blog by the use of Google while looking for a comparable topic, your website came up, it appears good. I've bookmarked it in my google bookmarks.designer websites

    ReplyDelete
  37. Tadalista 40 mg is helpful to the treatment men erectile dysfunction with 40 mg. Buy Tadalista 40mg online at low priced which manufactured by Fortune Healthcare.

    ReplyDelete
  38. We fully understand we need the writer to appreciate for this. The main illustrations you have made, the simple site menu, the friendships you make it easier to engender - it is many terrific, and it's leading our son and the family imagine that that subject is exciting, and that's especially essential. Thanks for everything! sme finance

    ReplyDelete
  39. Safegenericpharmacy is an worlds online Indian medicine pharmacy or drug store. Buy generic medicine at safegenericpharmacy cheapest price especially for USA, UK, Australia, and France.

    ReplyDelete
  40. Hey what a brilliant post I have come across and believe me I have been searching out for this similar kind of post for past a week and hardly came across this. Thank you very much and will look for more postings from you.

    sme working capital loan

    sme loan singapore

    business loans

    pr application

    bhutan travel

    meditation

    small business loan Singapore

    bitcoin trading

    bitcoin trading

    sme loan singapore

    digital assets

    ReplyDelete
  41. Buy Cenforce D Online (Sildenafil 100mg + Depoxetine 60mg) helps man to overcome the problem of frequent erectile failure problem. Cenforce is the most popular brand in India and also most awaited Brand in the world.

    ReplyDelete
  42. that was a great blog. can gain more knowledge from this. keep posting Solar Panel Price in Chennai

    ReplyDelete
  43. Hello Dear, I hope so you are very good. Thank you for share this great information with us.i will read your all articles. I like it. your this information is very helpful for us. I make sure you can share with us more new information. keep it up to god bless you.

    ReplyDelete
  44. Hi there would you mind letting me know which webhost you're utilizing? I've loaded your blog in 3 different web browsers and I must say this blog loads a lot quicker then most. Can you suggest a good hosting provider at a reasonable price? Kudos, I appreciate it!
    design a website

    ReplyDelete
  45. I assure this would be beneficial for most of the people. Class 2 Digital Signature Certificate

    ReplyDelete
  46. Thanks dude! for sharing such a great article with us. Also Check my blog BloggingHindi.com

    ReplyDelete
  47. Awesome Article! This article is really worth for me. I will try on my blog MotivateHindi.com

    ReplyDelete
  48. I really enjoyed reading your blog, you have lots of great content. To make the documents secure digital signature and encryption is the best way. Please visit here:
    Digital Signature Certificate in Delhi

    ReplyDelete
  49. You have given such a great information that will be very useful for me. I want to know more information deeply about it.
    Private Detective Agency in Mumbai

    ReplyDelete
  50. Love it! Very interesting topics, I hope the incoming comments and suggestion are equally positive. Thank you for sharing this information that is actually helpful.
    Class 2 Digital Signature Certificates

    ReplyDelete

More Posts

FOLLOW