Unsupported scripts and control panel web app for a hosting company
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

discount.php 309B

12345678910111213141516171819202122
  1. <?PHP
  2. $codes = array();
  3. function randLetter($set) {
  4. global $codes;
  5. $num = rand(65,90);
  6. $codes[$set] += $num - 65;
  7. return chr($num);
  8. }
  9. for ($i = 0; $i < 4; $i++) {
  10. for ($j = 0; $j < 4; $j++) {
  11. echo randLetter($i);
  12. }
  13. echo '-';
  14. }
  15. for ($i = 0; $i < 4; $i++) {
  16. echo chr(($codes[$i] % 26) + 65);
  17. }
  18. ?>