I want to flood some random data in a PHP form. Can I do it?
I want to actually test my website and database ofcourse. All I want to know that is it capable of handling if multiple registration is done at same time.
I want to flood some random data in a PHP form. Can I do it?
I want to actually test my website and database ofcourse. All I want to know that is it capable of handling if multiple registration is done at same time.
cURL is a very good tool to fill up a (POST) form a submit it. You may find a cURL library implementation in PHP, so you can use a "familiar" language to get random data, but you can also use the command line version.
First, create pages that echo data from source.
Second create a php page that will do the following:
Echo results into page.
// variables from data
$var1 = file_get_contents('data1.php');
$var2 = file_get_contents('data2.php');
$var3 = file_get_contents('data3.php');
$var4 = file_get_contents('data4.php');
// pass variables into array
$data = array($var1, $var2, $var3, $var4,);
$dkey = array_rand($data); // random selection
echo 'Data: '.$data[$dkey]; // echo selection
Your finished code will look like this: