&1"); $items=@json_decode(@file_get_contents("/tmp/scrapy-debug.json"),true)?:[]; echo json_encode(["spider"=>$spider,"items"=>count($items),"data"=>array_slice($items,0,5),"log"=>substr($out,-500)]);