Ok, Lets say I have 15 alphanumeric digits and one of those digits is unknown.
Ex: A1B2C3B4B5L4 ? M8
My goal is to find that unknown alphanumeric digit, I don't want to plug in the missing digit manually so I need to make this script work so that it does automatically.
Where I want it to work? I want the php script to plug in the code with the unknown digit into the text field in the website and replace the unknown with alphanumeric digit. I was thinking to put code into html file and view the website with text field in iframe. I don't know if that will actually work, so if any of you have any better suggestion on this topic please tell.
Also I don't know if anyone of you know how to do it, but I also want to submit (button) the code automatically, maybe someone of you know how to push submit button automatically once the unknown digit is changed with a help of php.
Here is the two code:
/**
* Generate and return a random string
*
* The default string returned is 8 alphanumeric characters.
*
* The type of string returned can be changed with the output parameter.
* Four types are available: alpha, numeric, alphanum and hexadec.
*
* If the output parameter does not match one of the above, then the string
* supplied is used.
*
* @param int $length Length of string to be generated
* @param string $seeds Seeds string should be generated from
*/
function str_rand($length = 8, $output = 'alphanum')
{
// Possible seeds
$outputs['alpha'] = 'abcdefghijklmnopqrstuvwqyz';
$outputs['numeric'] = '0123456789';
$outputs['alphanum'] = 'abcdefghijklmnopqrstuvwqyz0123456789';
$outputs['hexadec'] = '0123456789abcdef';
// Choose seed
if (isset($outputs[$output])) {
$output = $outputs[$output];
}
// Seed generator
list($usec, $sec) = explode(' ', microtime());
$seed = (float) $sec + ((float) $usec * 100000);
mt_srand($seed);
// Generate
$str = '';
$output_count = strlen($output);
for ($i = 0; $length > $i; $i++) {
$str .= $output{mt_rand(0, $output_count - 1)};
}
return $str;
}
Another one:
$code = "Some gift code here";
$randChar = str_rand(1);
str_replace("?", $randChar, $code);
And I think these are the values for the php script to spot the text field where it will need to paste a code with unknown digit and another value for the submission of the code.

If you know how to do any of these please provide help.