$max = 1000000000 - 500000000;
$file_str = array();
$page = 1;
$page_count = 1000000;
for( $i = 0; $i < $max; $i++ )
{
$key = skip32_encode( $i );
$str = $i.':'.$key."n";
$file_name = $key % 10000;
if( !isset( $file_str[ $file_name ] ) )
{
$file_str[ $file_name ] = "";
}
//Save the result into an array of size 1000000, and then write it to the file at once
$file_str[ $file_name ] .= $str;
unset( $key, $str );
if( $i > ( 3000000000 + $page * $page_count ) )
{
$page++;
foreach( $file_str as $key => $value )
{
file_put_contents( " /data/work/lzz/niu4/tmp/skip32/ {$key }.log ", $ value, file_append); E ); U unset ($ file_str);
$ file_str = array ();
}}}
echo "is over";
exit (); :' '{print $2}' | uniq -d This way you can determine whether there are duplicates
The above introduces PHP to determine whether there are duplicates after skip32 encryption, including skip and p32 content. I hope it will be helpful to friends who are interested in PHP tutorials.