Home  >  Article  >  Backend Development  >  PHP determines whether there are duplicates after skip32 encryption 5800-p32tqf 0010 Haier p32r1 does not boot p32r

PHP determines whether there are duplicates after skip32 encryption 5800-p32tqf 0010 Haier p32r1 does not boot p32r

WBOY
WBOYOriginal
2016-07-29 08:49:491427browse

$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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn