Hacker News new | ask | show | jobs
by redredraider 5580 days ago

   $data = "http://hackerunderground.com/solution/blank;
   $ch = curl_init($data); 
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
   $base = curl_exec($ch);

   for($i=0;$i<10000;$i++)
   {
   $data = "http://hackerunderground.com/solution/$i;
   $ch = curl_init($data); 
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
   $response = curl_exec($ch); 
   if($response != $base)
   {
   echo $i;
   }
   }


I like my solution best. Everyone should try it!
3 comments

I like how it keeps going even after it finds the solution.
Haha my bad.
That's a true hack ... :)
This will work for all the puzzles too. :-)