Advertisement
Guest User

Gmail auto aign up

a guest
May 20th, 2017
2,781
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.85 KB | None | 0 0
  1. <?php
  2. /*
  3. ## Title: gMail Signup Script V00.00.01
  4. ## Author(s): Jack Ketch
  5. ## Last Update: 06-14-2008
  6. ##
  7. ## Semi-automatic script to generate free GMail accounts,
  8. ##
  9. ## Modified: Anand (netmktg / netmktg7)
  10. ## Last Update: Oct-12-2008
  11. ## This script is an extensively modified version of the original script
  12. ##
  13. */
  14.  
  15. require_once('opendb.php');
  16. require_once('mailsignup-functions.php');
  17.  
  18. error_reporting(E_ALL ^ E_NOTICE);
  19.  
  20. $tmpdir = 'tmp/';
  21. $tmpdir_abs = dirname($_SERVER['DOCUMENT_ROOT'] . $_SERVER['SCRIPT_NAME']) .'/refererx/'. $tmpdir;
  22.  
  23. $submitted = isset($_POST['Create_Account']);
  24.  
  25. if ($submitted) {
  26. unlink($_POST['captcha_tmpfile']);
  27.  
  28. $formLocation = urldecode($_POST['formlocation']);
  29. $firstname = $_POST['firstname'];
  30. $lastname = $_POST['lastname'];
  31. $username = $_POST['username'];
  32. $password = $_POST['password'];
  33. $alt_email = $_POST['alt_email'];
  34. $captcha = $_POST['captcha'];
  35. $postQuery = $_POST['params'];
  36. $ref = $_POST['ref'];
  37.  
  38. // $write_to_file = $_POST['write_to_file'];
  39. // if (empty($write_to_file)) { $write_to_file = 'new-gmails.txt'; }
  40.  
  41. // the CAPTCHA is placed in the parameters, and then all the parameters are placed //
  42. // in a single string, each one separated by '&' //
  43. $captcha_array_key = array_search('newaccountcaptcha=',$postQuery);
  44. $postQuery [$captcha_array_key] .= $captcha;
  45. $query = $postQuery[0];
  46. for ($x = 1; $x < count($postQuery); $x++) { $query .= "&" . $postQuery[$x]; }
  47.  
  48. $ch = curl_init();
  49.  
  50. $cookiefile = $tmpdir_abs . '_cookie.txt';
  51. curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefile);
  52. curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile);
  53.  
  54. curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14");
  55. curl_setopt($ch, CURLOPT_HEADER, 1);
  56. curl_setopt($ch, CURLINFO_HEADER_OUT, 1);
  57. curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
  58. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  59. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  60. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  61. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  62.  
  63. $headers[] = "Cookie: X=abc; GoogleAccountsLocale_session=en; TZ=-330";
  64. $headers[] = "Content-Type: application/x-www-form-urlencoded";
  65. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  66.  
  67. curl_setopt($ch, CURLOPT_URL, $formLocation);
  68. curl_setopt($ch, CURLOPT_REFERER, $ref);
  69. curl_setopt($ch, CURLOPT_POST, 1);
  70. curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
  71. $page = curl_exec($ch);
  72.  
  73. if ( strpos($page, 'but the following usernames are') ) {
  74. print '<font color="#0000FF"><b>Gmail User NOT Available</b></font>';
  75. return;
  76. }
  77.  
  78. if ( strpos($page, 'characters you entered didn') ) { $captcha_msg = '<font color="#FF0000"><b>WRONG Captcha</b></font><br>'; }
  79.  
  80. if ( strpos($page, 'enter the letters as they are shown in the new image') ) { $captcha_msg = '<font color="#0000FF"><b>ADDITIONAL Captcha</b></font><br>'; }
  81.  
  82.  
  83. $chk_pos = strpos($page, '<form id="createaccount"');
  84.  
  85. if ($chk_pos > 0)
  86. {
  87. // Gmail wants us to enter Addtional Captcha
  88. $page = substr($page, $chk_pos);
  89.  
  90. $ref = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
  91.  
  92. $parameters = parse_gmail_fields($page, $username, $password, $firstname, $lastname, $alt_email);
  93. $formLocation = array_pop($parameters);
  94. $captchatoken = array_pop($parameters);
  95.  
  96. $captcha_tmpfile = save_captcha($ch, $captchatoken, $tmpdir, $tmpdir_abs);
  97. curl_close($ch);
  98.  
  99. // Display CAPTCHA to solve
  100. $currentUrl = $PHP_SELF;
  101.  
  102. $hidden = '';
  103. foreach($parameters as $param){
  104. $hidden .= "<input type='hidden' name='params[]' value='$param'>\
  105. ";
  106. }
  107.  
  108. $form = <<<INPUT_MYTEXT
  109. <center> <table> <tr> <td>
  110. <form method='post' action='$currentUrl'>
  111.  
  112. $hidden
  113. <input type='hidden' name='ref' value='$ref'>
  114. <input type='hidden' name='firstname' value='$firstname'>
  115. <input type='hidden' name='lastname' value='$lastname'>
  116. <input type='hidden' name='username' value='$username'>
  117. <input type='hidden' name='password' value='$password'>
  118. <input type='hidden' name='alt_email' value='$alt_email'>
  119. <input type='hidden' name='formlocation' value='$formLocation'>
  120. <input type='hidden' name='captcha_tmpfile' value='$tmpdir_abs$captcha_tmpfile'>
  121.  
  122. <table>
  123. <tr>
  124. <td align="center" colspan="2">$captcha_msg</td>
  125. </tr>
  126. <tr> <td align="center" colspan="2">&nbsp;</td> </tr>
  127. <tr>
  128. <td>Username:</td>
  129. <td><b>$username</b>@gmail-com</td>
  130. </tr>
  131. <tr>
  132. <td>Password:</td>
  133. <td><b>$password</b></td>
  134. </tr>
  135. <tr>
  136. <td>Name:</td>
  137. <td><b>$firstname $lastname</b></td>
  138. </tr>
  139. <tr>
  140. <td>&nbsp;</td>
  141. <td><img src="$tmpdir$captcha_tmpfile"></td>
  142. </tr>
  143. <tr>
  144. <td>Captcha:</td>
  145. <td><input type="text" name="captcha" id="captcha"></td>
  146. </tr>
  147. <tr>
  148. <td align="center" colspan="2"><input type="submit" name="Create_Account" value="Create Account"></td>
  149. </tr>
  150. </table>
  151. </form>
  152. </td> </tr> </table> </center>
  153.  
  154. <script type="text/javascript">
  155. document.getElementById('captcha').focus()
  156. </script>
  157. INPUT_MYTEXT;
  158.  
  159. echo $form;
  160. return;
  161. }
  162.  
  163. if ( strpos($page, '<meta http-equiv') ) {
  164. // Follow the Meta redirect
  165. $google_meta_regex = '/\\<meta http-equiv.+?refresh.+?(http:\\/\\/[^\\'^\\"^\\>]+?)('){0,1}(\\"){0,1}\\>/i';
  166. preg_match($google_meta_regex,$page,$m);
  167. $curl_url = $m[1];
  168. $curl_url = str_replace('&amp;', '&', $curl_url);
  169.  
  170. $headers[] = "Cookie: X=abc; GoogleAccountsLocale_session=en; TZ=-330";
  171. $headers[] = "Content-Type: application/x-www-form-urlencoded";
  172. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  173.  
  174. curl_setopt($ch, CURLOPT_URL, $curl_url);
  175. curl_setopt($ch, CURLOPT_POST, 0);
  176. $page = curl_exec($ch);
  177. }
  178.  
  179. curl_close($ch);
  180.  
  181. $succeeded = stripos($page, "Congratulations!");
  182. if ($succeeded) {
  183. @ unlink($cookiefile);
  184. $info = <<<INPUT_MYTEXT
  185. <center> <table>
  186. <tr>
  187. <td>Username:</td>
  188. <td><input type='text' id='username' name='username' value='$username@gmail-com' onClick="javascript:x = document.getElementById('username');x.focus();x.select();"></td>
  189. </tr>
  190. <tr>
  191. <td>Password:</td>
  192. <td><input type='text' id='password' name='password' value='$password' onClick="javascript:x = document.getElementById('password');x.focus();x.select();"></td>
  193. </tr>
  194. <tr>
  195. <td>Name:</td>
  196. <td><input type='text' id='name' name='name' value='$firstname $lastname' onClick="javascript:x = document.getElementById('password');x.focus();x.select();"></td>
  197. </tr>
  198. <tr>
  199. <td align="center" colspan="2"><font color="#00CC00"><b>••••&nbsp; GMail SUCCESS &nbsp;••••</b></font></td>
  200. </tr>
  201. <tr> <td align="center" colspan="2">&nbsp;</td> </tr>
  202. <tr> <td align="center" colspan="2">&nbsp;</td> </tr>
  203. </table>
  204.  
  205. </center>
  206. INPUT_MYTEXT;
  207.  
  208. echo $info;
  209.  
  210. //$sqlquery = "INSERT IGNORE INTO emails (email,email_password,email_name) VALUES ('$username@gmail-com', '$password', '$firstname $lastname')";
  211. //mysql_query($sqlquery);
  212.  
  213.  
  214. // Write Signup data to existing file; on error use new filename
  215. $write_str = "$username@gmail-com,$password,$firstName $lastName\
  216. ";
  217. $fh = false;
  218. @ $fh = fopen($write_to_file, 'a');
  219. if (!$fh) {
  220. $write_to_file = 'new-gmails_' . rand(1000,100000) . '.txt';
  221. $fh = fopen($write_to_file, 'a');
  222. }
  223. fwrite($fh, $write_str);
  224. fclose($fh);
  225. print "</br>Written Login Data to $write_to_file</br></br>\
  226. ";
  227.  
  228. }
  229. else {
  230. print '</br></br><font color="#FF0000"><b>Signup process FAILED</b></font>';
  231. print $page;
  232. return;
  233. }
  234. }
  235.  
  236.  
  237. $ch = curl_init();
  238.  
  239. $cookiefile = $tmpdir_abs . '_cookie.txt';
  240. curl_setopt($ch, CURLOPT_COOKIEJAR, $cookiefile);
  241. curl_setopt($ch, CURLOPT_COOKIEFILE, $cookiefile);
  242. curl_setopt($ch, CURLOPT_COOKIESESSION, 1);
  243.  
  244. curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14");
  245. curl_setopt($ch, CURLOPT_HEADER, 1);
  246. curl_setopt($ch, CURLINFO_HEADER_OUT, 1);
  247. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  248. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  249. curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
  250. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  251. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  252.  
  253. $url = 'hxxp : / / mail-google-com / mail / signup';
  254. curl_setopt($ch, CURLOPT_URL, $url);
  255. curl_setopt($ch, CURLOPT_POST, 0);
  256. $page = curl_exec($ch);
  257.  
  258. // Get the Last effective Url to set Referer in subsequent Curl operations
  259. $ref = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
  260.  
  261. // Generates random user profile for email signup
  262. $gProfile = new profile();
  263. $gProfile->__construct();
  264. $firstname = $gProfile->getName("f");
  265. $lastname = $gProfile->getName("l");
  266. $username = $gProfile->getUsername();
  267. $password = $gProfile->getPassword();
  268. $alt_email = $gProfile->getAlternateEmail();
  269.  
  270. $parameters = parse_gmail_fields($page, $username, $password, $firstname, $lastname, $alt_email);
  271. $formLocation = array_pop($parameters);
  272. $captchatoken = array_pop($parameters);
  273.  
  274. $captcha_tmpfile = save_captcha($ch, $captchatoken, $tmpdir, $tmpdir_abs);
  275. curl_close($ch);
  276.  
  277. // Display CAPTCHA to solve
  278. $currentUrl = $PHP_SELF;
  279.  
  280. $hidden = '';
  281. foreach($parameters as $param){
  282. $hidden .= "<input type='hidden' name='params[]' value='$param'>\
  283. ";
  284. }
  285.  
  286. $form = <<<INPUT_MYTEXT
  287. <center> <table> <tr> <td>
  288. <form method='post' action='$currentUrl'>
  289.  
  290. $hidden
  291. <input type='hidden' name='ref' value='$ref'>
  292. <input type='hidden' name='firstname' value='$firstname'>
  293. <input type='hidden' name='lastname' value='$lastname'>
  294. <input type='hidden' name='username' value='$username'>
  295. <input type='hidden' name='password' value='$password'>
  296. <input type='hidden' name='alt_email' value='$alt_email'>
  297. <input type='hidden' name='formlocation' value='$formLocation'>
  298. <input type='hidden' name='captcha_tmpfile' value='$tmpdir_abs$captcha_tmpfile'>
  299.  
  300. <table>
  301. <tr>
  302. <td>Username:</td>
  303. <td><b>$username</b>@gmail-com</td>
  304. </tr>
  305. <tr>
  306. <td>Password:</td>
  307. <td><b>$password</b></td>
  308. </tr>
  309. <tr>
  310. <td>Name:</td>
  311. <td><b>$firstname $lastname</b></td>
  312. </tr>
  313. <tr>
  314. <td>&nbsp;</td>
  315. <td><img src="$tmpdir$captcha_tmpfile"></td>
  316. </tr>
  317. <tr>
  318. <td>Captcha:</td>
  319. <td><input type="text" name="captcha" id="captcha"></td>
  320. </tr>
  321. <tr>
  322. <td align="center" colspan="2"><input type="submit" name="Create_Account" value="Create Account"></td>
  323. </tr>
  324. </table>
  325. </form>
  326. </td> </tr> </table> </center>
  327.  
  328. <script type="text/javascript">
  329. document.getElementById('captcha').focus()
  330. </script>
  331. INPUT_MYTEXT;
  332.  
  333. echo $form;
  334.  
  335.  
  336. // ### End Main Routine ###
  337.  
  338.  
  339. function parse_gmail_fields($page, $username, $password, $firstname, $lastname, $alt_email)
  340. {
  341. // removes new lines, and multiple spaces to for proper Regex matching
  342. $page = clean_whitespace($page);
  343.  
  344. preg_match("/<form id=\\"createaccount\\" name=\\"createaccount\\" action='(.+?)'/", $page, $m);
  345. $formLocation = urlencode($m[1]);
  346.  
  347. preg_match("/<input type=\\"hidden\\" name=\\"type\\" id=\\"type\\" value=\\"(.+?)\\"/", $page, $m);
  348. $parameters[] = "type=" . $m[1];
  349.  
  350. $parameters[] = "loc=US";
  351.  
  352. preg_match("/<input type=\\"hidden\\" name=\\"dsh\\" id=\\"dsh\\" value=\\"(.+?)\\"/", $page, $m);
  353. $parameters[] = "dsh=" . $m[1];
  354.  
  355. $parameters[] = "ktl=";
  356. $parameters[] = "ktf=";
  357.  
  358. $parameters[] = "FirstName=" . $firstname;
  359. $parameters[] = "LastName=" . $lastname;
  360. $parameters[] = "UsernameSelector=header";
  361. $parameters[] = "Email=" . $username;
  362.  
  363. preg_match("/<input type=\\"hidden\\" id='edk' name='edk' value='(.+?)'/", $page, $m);
  364. $parameters[] = "edk=" . $m[1];
  365.  
  366. $parameters[] = "Passwd=" . $password;
  367. $parameters[] = "PasswdAgain=" . $password;
  368.  
  369. $parameters[] = "rmShown=1";
  370. $parameters[] = "nshk=1";
  371.  
  372. $parameters[] = "selection=" . urlencode("What was your first teacher's name");
  373. $parameters[] = "ownquestion=";
  374. $parameters[] = "IdentityAnswer=" . $firstname;
  375.  
  376. $parameters[] = "SecondaryEmail=" . urlencode($alt_email);
  377.  
  378. $parameters[] = "loc=US";
  379.  
  380. // get CAPTCHA token
  381. preg_match("/<input type=\\"hidden\\" name=\\"newaccounttoken\\" id=\\"newaccounttoken\\" value=\\"(.+?)\\"/", $page, $m);
  382. $captchatoken = $m[1];
  383. $parameters[] = "newaccounttoken=" . urlencode($captchatoken);
  384.  
  385. // get CAPTCHA url
  386. preg_match("/<input type=\\"hidden\\" name=\\"newaccounturl\\" id=\\"newaccounturl\\" value=\\"(.+?)\\"/", $page, $m);
  387. $parameters[] = "newaccounturl=" . urlencode($m[1]);
  388.  
  389. // get Audio CAPTCHA token
  390. preg_match("/<input type=\\"hidden\\" name=\\"newaccounttoken_audio\\" id=\\"newaccounttoken_audio\\" value=\\"(.+?)\\"/", $page, $m);
  391. $parameters[] = "newaccounttoken_audio=" . urlencode($m[1]);
  392.  
  393. // get Audio CAPTCHA url
  394. preg_match("/<input type=\\"hidden\\" name=\\"newaccounturl_audio\\" id=\\"newaccounturl_audio\\" value=\\"(.+?)\\"/", $page, $m);
  395. $parameters[] = "newaccounturl_audio=" . urlencode($m[1]);
  396.  
  397. $parameters[] = "newaccountcaptcha=";
  398. $parameters[] = "program_policy_url=http%3A%2F%2Fmail-google-com%2Fmail%2Fhelp%2Fprogram_policies.html";
  399. $parameters[] = "privacy_policy_url=http%3A%2F%2Fwww-google-com%2Fintl%2Fen%2Fprivacy.html";
  400. $parameters[] = "requested_tos_location=US";
  401. $parameters[] = "requested_tos_language=en";
  402.  
  403. preg_match('/<input type=\\"hidden\\" id=\\'served_tos_location\\' name=\\'served_tos_location\\' value=\\'(.+?)\\'/', $page, $m);
  404. $parameters[] = "served_tos_location=" . $m[1];
  405.  
  406. $parameters[] = "served_tos_language=en";
  407. $parameters[] = "submitbutton=" . urlencode('I accept. Create my account.');
  408.  
  409. $parameters[] = $captchatoken;
  410. $parameters[] = $formLocation;
  411.  
  412. return $parameters;
  413. }
  414.  
  415.  
  416. function save_captcha($ch, $captchatoken, $tmpdir, $tmpdir_abs)
  417. {
  418. // Save Captcha image
  419. $url = "hxxps : / / www-google-com / accounts / Captcha?ctoken=$captchatoken";
  420. curl_setopt($ch, CURLOPT_HEADER, 0);
  421. curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
  422. curl_setopt($ch, CURLOPT_URL, $url);
  423. curl_setopt($ch, CURLOPT_POST, 0);
  424. $page = curl_exec($ch);
  425.  
  426. $captcha_tmpfile = 'captcha-' . rand(1000,10000) . '.jpg';
  427. $fp = fopen($tmpdir_abs . $captcha_tmpfile,'w');
  428. fwrite($fp, $page);
  429. fclose($fp);
  430.  
  431. return $captcha_tmpfile;
  432. }
  433.  
  434.  
  435. ?>
  436.  
  437. mailsignup-functions.php - supporting file
  438.  
  439. <?php
  440.  
  441. /*
  442. ## Title: Random Stirng Function V01.00.00
  443. ## Author(s): Jack Ketch
  444. ##
  445. ## Return a random stirng of lower case characters.
  446. ## Parameter(s):
  447. ## $min, $max - minimum/maximum length of string
  448. ## $useNumbers - sets the use of numbers (TRUE or FALSE, default = FALSE)
  449. ## $useUpper - sets the use of upper case characters (TRUE or FALSE, default = FALSE)
  450. ##
  451. ##
  452. ## Modified: Anand (netmktg)
  453. ## Last Update: Oct-12-2008
  454. ##
  455. */
  456.  
  457. // If PHP doesnt have stripos function
  458. if(!function_exists('stripos'))
  459. {
  460. function stripos($haystack,$needle,$offset = 0)
  461. {
  462. return(strpos(strtolower($haystack),strtolower($needle),$offset));
  463. }
  464. }
  465.  
  466. function randomString($min, $max, $useNumbers = FALSE, $useUpper = FALSE)
  467. {
  468. $charSet = "abcdefghijklmnopqrstuvwxyz";
  469. if ($useNumbers) { $charSet .= "0123456789"; }
  470. if ($useUpper) { $charSet .= "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; }
  471.  
  472. ## checks if the min and max are reversed. ##
  473. if ($min > $max) { $length = mt_rand($max, $min); }
  474. else { $length = mt_rand($min, $max); }
  475.  
  476. $randStr = '';
  477. $setLength = strlen($charSet) - 1;
  478. for ($i = 0; $i < $length; $i++) { $randStr .= $charSet[mt_rand(0, $setLength)]; }
  479.  
  480. return $randStr;
  481. }
  482.  
  483.  
  484. function clean_whitespace($input_str, $repl_arr = array(" ", "\
  485. ", "\\r", "\ "))
  486. {
  487. $input_str = str_replace($repl_arr, ' ', $input_str);
  488. $input_str = preg_replace('/ +/', ' ', $input_str);
  489.  
  490. return $input_str;
  491. }
  492.  
  493.  
  494. /*
  495. ##
  496. ## Title: Profile Class V01.00.00
  497. ## Author: Jack Ketch
  498. ##
  499. ## Generate random data to be use for automatic registrations of websites.
  500. ##
  501. ##
  502. ## Modified: Anand (netmktg)
  503. ## Last Update: Oct-12-2008
  504. ##
  505. */
  506.  
  507. class profile {
  508. var $_gender;
  509. var $_firstName;
  510. var $_lastName;
  511. var $_username;
  512. var $_password;
  513. var $_alternateEmail;
  514. var $_securityQuestion = "Where did you meet your spouse";
  515. var $_answer = "College";
  516.  
  517. var $_usernameMinLength = 5;
  518. var $_usernameMaxLength = 14;
  519. var $_randomStringLength = 4;
  520. // separates the name from the random characters
  521. var $_separator = '';
  522.  
  523. function __construct() {
  524. $gender = mt_rand(0, 1);
  525. $surnames = explode("\
  526. ", file_get_contents("names_last.txt"));
  527. if ($gender == 0) {
  528. $this->_gender = "m";
  529. $names = explode("\
  530. ", file_get_contents("names_male.txt"));
  531. }
  532. else {
  533. $this->_gender = "f";
  534. $names = explode("\
  535. ", file_get_contents("names_female.txt"));
  536. }
  537. $this->_lastName = trim(ucfirst($surnames[array_rand($surnames)]));
  538.  
  539. $minNameLength = $this->_usernameMinLength - $this->_randomStringLength - strlen($this->_separator);
  540. $maxNameLength = $this->_usernameMaxLength - $this->_randomStringLength - strlen($this->_separator);
  541. do {
  542. $this->_firstName = trim(ucfirst($names[array_rand($names)]));
  543. } while ( (strlen($this->_firstName) <= $minNameLength) || (strlen($this->_firstName) >= $maxNameLength) );
  544.  
  545. $this->_username = strtolower($this->_firstName) . $this->_separator . randomString($this->_randomStringLength, $this->_randomStringLength, TRUE);
  546. $this->_password = randomString(8, 10);
  547.  
  548. $this->_alternateEmail = randomString(6,8) . "@" . randomString(6,9) . ".com";
  549. }
  550.  
  551. function getGender() {
  552. return $this->_gender;
  553. }
  554.  
  555. function getName($type) {
  556. if ($type == "f") {
  557. return $this->_firstName;
  558. }
  559. else if ($type == "l") {
  560. return $this->_lastName;
  561. }
  562. }
  563.  
  564. function getUsername() {
  565. return $this->_username;
  566. }
  567.  
  568. function getPassword() {
  569. return $this->_password;
  570. }
  571.  
  572. function getAlternateEmail() {
  573. return $this->_alternateEmail;
  574. }
  575.  
  576. function getSecurityQuestion($type = "q") {
  577. if ($type == "q") {
  578. return $this->_securityQuestion;
  579. }
  580. else if ($type == "a") {
  581. return $this->_answer;
  582. }
  583. }
  584. }
  585.  
  586. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement