Advertisement
Guest User

Solution

a guest
Jul 26th, 2014
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1. <?php
  2. // Fixing the first number
  3. $array1['7787'] = intval(md5(7787));    //Array because if you want to try multiple nos
  4.  
  5. for ($i = 7777777777; $i < 9999999999; $i++)
  6. {
  7.     if (!preg_match("!^".str_repeat("[7-9]",10)."$!", $i))
  8.         continue;
  9.     else
  10.     {
  11.         $num2hash = md5($i); $value = intval($num2hash);
  12.         if ($value <= 0) continue;
  13.         if ($num1 = array_search($value, $array1))
  14.         {
  15.             $num1hash = md5($num1);
  16.             if ($num1hash[1] != $num2hash[0])
  17.                 echo "First is : ".array_search($value, $array1)."\nSecond is : $i\n";
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement