Search code examples
phpbandwidth

Bandwidth waster algorithm for PHP


I am trying to create a software in PHP that can run continuously and keep on wasting bandwidth.

Can anyone one sugggest any solutions.


Solution

  • Make a huge file and make it publically accessible then just make a page which loads the image and then calls itself.

    (Note this is an infinite loop so you should probably put something in to be able to stop it such as a time constraint or a counter)

    Something like this idea might do:

    <?php
    //waster.php
    header('Connection: close');
    header('Content-Length: 0');
    file_get_contents('http://www.example.com/hugeimage.jpg');
    file_get_contents('http://www.example.com/waster.php');