Wiki source for CategoryDatabug


Show raw source

=====Databug=====
Databug is a PHP class that generates random profile data. It is useful for web application testing, or for just generating random profile data. The first version was released in [[http://databugger.blogspot.com/ August 2006]]. A refactored and extended version was released in June 2007.

Source code and additional information available at the [[http://code.google.com/p/databug/ Databug project page]]. A demo can be found at the [[http://bohlag.blogspot.com/ Blog of Hypothetical Ladies and Gentlemen]].

===Usage===
%%(php)
require_once('path/to/profile.class.php');
$Databug = new DatabugProfile($debug=1);
$Databug->build_us_profile($state='*', $gender='*', $first_name='*', $last_name='*');
$PROFILE = $Databug->to_array();
print_r($PROFILE);
%%

===Sample Output===
%%(php)
Array
(
[first_name] => Aarika
[last_name] => Bouchard
[full_name] => Aarika Bouchard
[user_name] => abouchard
[email] => abouchard93596@yahoo.com
[gender] => 1
[gender_name] => female
[street_address] => 7577 Raymond Road
[city] => Bronx
[state] => NY
[zipcode] => 10456
[address1] => 7577 Raymond Road
[address2] => Bronx, NY 10456
[phone] => (555) 701-8868
)
%%
Valid XHTML 1.0 TransitionalValid CSSWikkaWiki