-4

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

Can anyone one sugggest any solutions.

Vish
  • 4,508
  • 10
  • 42
  • 74

3 Answers3

1

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');
Gricey
  • 1,321
  • 1
  • 18
  • 38
0

In order to waste bandwidth you don't need a continuously running php script. It will waste processing not bandwidth. Just write a PHP script to Display a large Image file and write a utility or script (unix) in a local machine to continuously call that url and download the image and perhaps delete it.

Anyway seems like something evil is going to happen :)

shazin
  • 21,379
  • 3
  • 54
  • 71
0

Depending on what you are trying to do, you could use a tool like Fiddler to simulate network latency or slow connection speeds.

CodingWithSpike
  • 42,906
  • 18
  • 101
  • 138