+$GLOBALS['total_hashes'] = 0;
+$GLOBALS['total_blocks'] = 0;
+
+// Is the check point there?
+if (is_readable(CHECK_POINT)) {
+ // Then load it
+ $checkPoint = file_get_contents(CHECK_POINT);
+
+ // Explode it
+ $data = explode(':', $checkPoint);
+
+ // Assert on count
+ assert(count($data) == 6);
+
+ // 1st element is nonce, 2nd hash, 3rd found hashes
+ $GLOBALS['total_blocks'] = $data[0];
+ $GLOBALS['total_hashes'] = $data[1];
+ $GLOBALS['cycles'] = intval($data[2]);
+ $nonce = base64_decode($data[3]);
+ $modulaHash = $data[4];
+ $GLOBALS['found_hashes'][$GLOBALS['total_blocks']] = unserialize(gzuncompress(base64_decode($data[5])));
+} else {
+ // Create nonce (small)
+ $nonce = 1 / mt_rand();
+}