title = "index" url = "/" is_hidden = 0 == function onStart() { $this['kims'] = "Kims!"; if ($curl = curl_init()) { curl_setopt($curl, CURLOPT_URL, 'http://kege.su/api/v1/kims?limit=1000000&company=$company'); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); $out = curl_exec($curl); curl_close($curl); } $allKims = json_decode($out) -> items; $kims9 = []; $kims11 = []; $kims = new stdClass(); $kims -> class9 = []; $kims -> class11 = []; foreach ($allKims as $kim){ if($kim->variant !== 1 || $kim->year->title == 2017){ continue; }; $kim->class = $kim->class_year->title; $kim->name = $kim->subject->title; if($kim->class == 9){ array_push($kims -> class9, $kim); }; if($kim->class == 11){ array_push($kims -> class11, $kim); }; }; $this["kims"] = $kims; } ==