Title: [PHP] BOopstick Author: Anonymous Pastebin link: http://pastebin.com/rqMgSwaY First Edit: Tuesday 3rd of April 2012 07:25:36 PM CDT Last Edit: Tuesday 3rd of April 2012 07:25:36 PM CDT index, "r");         $words_ = "";         $cursor = "";         $substringing = "";         $thread ="";         while (!feof($handle_))         {                 $words_ .= fread($handle_,8192);         }         $cursor = strpos($words_,"-(21 KB, 220x225,");         if($cursor==false)                 {                         $offset+=1;                         findmarker($offset, $array, $marker_hash);                         exit;                 }         $substringing = substr($words_,$cursor-100,100);         $start_of_image = strpos($substringing, "//images.4chan.org/mlp/src/");     $imagelocation = "http:". substr($substringing,$start_of_image, 44);         $hash =  hash_file("md5", $imagelocation);           if(strcmp ( $hash , $marker_hash )==0)                 {                 echo "

";                 echo "
Thread title: ". $array[$offset]->title. "
";                 echo "
Replies: ". $array[$offset]->replycount. "
";                         exit;                 }                 else                 {                         $offset+=1;                         findmarker($offset, $array, $marker_hash);                         exit;                 }         }         echo "Sorry babe, couldn't find the marker."; } class thread { public $textmark; public $json; public $title; public $index; public $imagecount; public $replycount; } $currentoffset = 0; $threadarray = array(); $count_250strip = 0; $key = "MLP General"; $scan_offset = 0; $threadid = ""; $marker_hash = "620202e43463198718d85e08faf2643b"; $imagehash = ""; echo ""; echo "MLPG Boopstart 2.0 (Catalog edition)"; echo ""; $handle = fopen("http://catalog.everypony.net/mlp/", "r"); $words = ""; while (!feof($handle)) { $words .= fread($handle,8192); } $number_of_threads = substr_count ($words, "MLP General");   for($i = 0; $i <= $number_of_threads-1; $i++)         {          $keylocation = strpos($words, $key, $scan_offset);          substr($words, $keylocation,20);      $openbracketindex = strrpos(substr($words,$scan_offset,$keylocation-$scan_offset), "{") + $scan_offset;          $closebracketindex = strpos($words, "}", $keylocation);          array_push($threadarray,new thread);          $threadarray[$i]->json = substr($words, $openbracketindex, $closebracketindex-$openbracketindex+1);          $threadarray[$i]->json;          $obj = json_decode($threadarray[$i]->json);          $indexcursor = $openbracketindex-30;          $indexbegin = strrpos(substr($words,$indexcursor,25),'"') + $indexcursor;          $indexcursor = $openbracketindex-6;          $indexend = strpos(substr($words, $indexcursor, 20),'"') + $indexcursor;          $threadarray[$i]->index = substr($words,$indexbegin+1,$indexend-$indexbegin-1);          $threadarray[$i]->title = $obj->{'teaser'};          $threadarray[$i]->replycount = $obj->{'r'};          $threadarray[$i]->imagecount = $obj->{'i'};          $scan_offset = $keylocation + strlen($key);         }         function dicksort($left,$right) { return $left->replycount > $right->replycount; } usort($threadarray,'dicksort'); findmarker(0, $threadarray, $marker_hash); ?>