Jump to content

PHP server stress tester, multiple image loader.


lol_php

Recommended Posts

Hi all. I'm writing a script to stress test my current host (Unmetered bandwidth - no worries ;)). I am not too familiar with this, but I want it to download a large image many times over. It would be good to establish many connections at once to simulate many users... Not sure how I can do that. My current implementation is as follows:

 

for ( $num = 1; $num <= 1000; $num += 1) {
echo "<img src=\"http://www.mywebsite.com/stresstest.jpg?$num\"><br />";
}
}

 

The issue with this is it slows down my browser and just doesn't seem like a smart way to do it. I would much rather have it establish several connections at once, and have it download images one after the other (only when the previous image has completed loading) through each connection... Also, it would be nice to do this without displaying a thousand 2MB JPG files in my browser at once. Is there an easy way to have it overwrite the previous image each time? Although this is a one off I see myself using it often to test out forum MOD stability etc.

 

Anyone got any ideas for a decent way to do this?

 

Thank you.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.