timshank
asked on
Web Script Needed to Generate Registration Code
I need a PHP or CGI script that will create a page and a random registration code for a software program that I had written. The code is 16 digits and is made up of letters and numbers. The first 4 and last 4 digits are to be pulled at random from a file named rannum.txt, the 8 digits in the middle should be random, it doesn't matter what they are as long as they are a random number or letter.
The rannum.txt file is in the following format&
AXDF
A2LR
R889
Z0L3
I am sending the person to the following URL, this is an example
www.myurl.com/code.php?address@email.com
The page that is generated should look like this, I'll edit the text to match what I need it to say later. The main part is that their email address should be on the page as well as the 16 digit number
-----
Thank You
Please use the following to register your program
address@email.com
[16 digit random code here]
-----
I would also like the URL to not display the ? and the email address if at all possible once the page loads. If they try to access the page directly without using the ?address@email.com, I would like to have the script leave them with the following message. I'll edit the message later to suit my needs.
The code did not generate. Please contact me for additional help with this
The rannum.txt file is in the following format&
AXDF
A2LR
R889
Z0L3
I am sending the person to the following URL, this is an example
www.myurl.com/code.php?address@email.com
The page that is generated should look like this, I'll edit the text to match what I need it to say later. The main part is that their email address should be on the page as well as the 16 digit number
-----
Thank You
Please use the following to register your program
address@email.com
[16 digit random code here]
-----
I would also like the URL to not display the ? and the email address if at all possible once the page loads. If they try to access the page directly without using the ?address@email.com, I would like to have the script leave them with the following message. I'll edit the message later to suit my needs.
The code did not generate. Please contact me for additional help with this
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER