Create script to process list of numbers and manipulate them on Windows
$30-100 USD
货到付款
This should be an easy one.
On a Windows machine, I want to be able to process a list of mobile telephone numbers as input and manipulate them to generate a new list as output after they have had his treatment applied.
The mobile numbers are 11 chars long. Where this treatment is currently done on the fly/online, that following PHP script is used:
<?
$keyId = "42000";
$pattern[0] = '/0/';
$pattern[1] = '/1/';
$pattern[2] = '/2/';
$pattern[3] = '/3/';
$pattern[4] = '/4/';
$pattern[5] = '/5/';
$pattern[6] = '/6/';
$pattern[7] = '/7/';
$pattern[8] = '/8/';
$pattern[9] = '/9/';
$replace[0] = 's';
$replace[1] = 'q';
$replace[2] = 'L';
$replace[3] = 'H';
$replace[4] = 'F';
$replace[5] = 'x';
$replace[6] = 'A';
$replace[7] = 'p';
$replace[8] = 'c';
$replace[9] = 'K';
$number = preg_replace($pattern, $replace, $cli);
if(strlen($cli)==11) {
$fix = "zz";
}else {
$fix = "z";
}
$pattern[0] = ' ';
$keyId = str_replace($pattern, "0", $keyId);
$url = "[url removed, login to view];.$keyId.$number.$fix."0"."7"."00"."UNKXXXXXX";
?>
We just need to replicate this treatment offline, take an input file of mobile numbers, perform this manipulation and output them with the above changes.
项目ID: #189013