{"id":186570,"date":"2013-07-14T17:45:03","date_gmt":"2013-07-14T13:45:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=186570"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=186570","title":{"rendered":"<span class=\"post_title\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 ncurses \u0432 PHP<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041a\u0430\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0438 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0432\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0438\u0448\u0435\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 php \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u0430 \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438. \u0421\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u044f\u0437\u044b\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0432\u043e\u0434\u044f\u0449\u0443\u044e\/\u0447\u0438\u0442\u0430\u044e\u0449\u0443\u044e \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <i>ncurses<\/i> \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 \u0441 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0432\u0438\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0438\u0434\u0430\u0445 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u0432.<\/p>\n<p>  PHP \u043e\u0447\u0435\u043d\u044c \u0433\u0438\u0431\u043e\u043a \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c, \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 (Perl\/bash-\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0438 \u043f\u0440\u043e\u0447\u0435\u0435). \u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c <i>ncurses<\/i> \u043f\u043e\u0440\u0430\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u0430 \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u043c php-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u0434\u0430\u0442\u044c \u0432\u0430\u043c \u00ab\u0442\u043e\u043b\u0447\u043e\u043a\u00bb \u0432 \u0441\u0444\u0435\u0440\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442 \u043d\u0430 php, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u042f \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0435\u0435\u0441\u044f \u043a \u0441\u0430\u043c\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, \u0438 \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0434\u0430\u0442\u044c \u0432\u0430\u043c \u0431\u0430\u0437\u0443 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f ncurses \u0432 \u0432\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438.<\/p>\n<h6>\u0414\u043b\u044f \u043a\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f<\/h6>\n<p>  \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u043e\u043f\u044b\u0442\u043d\u044b\u0445 php-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432, \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0445 php-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c. <i>(\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430: \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u043b\u044e\u0431\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e).<\/i><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0418\u0437\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u0442\u0435\u043c\u044b<\/h4>\n<p>  \u0418\u0437 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435:  <\/p>\n<ul>\n<li>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u043a\u043d\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <i>ncurses<\/i>, \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/li>\n<li>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043a\u043e\u043d \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0434\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430<\/li>\n<li>\u041a\u0430\u043a \u00ab\u043b\u043e\u0432\u0438\u0442\u044c\u00bb \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0448<\/li>\n<li>\u041a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c <i>traceroute<\/i>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0441\u0435 \u0438\u0437\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <i>ncurses<\/i><\/li>\n<\/ul>\n<p>  <\/p>\n<h4>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f<\/h4>\n<p>  <\/p>\n<ul>\n<li><b>Ncurses<\/b> (new curses) \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u041f\u041e, \u0438\u043c\u0438\u0442\u0438\u0440\u0443\u044e\u0449\u0430\u044f <i>curses<\/i> (System V Release 4.0), \u0438 \u0434\u0430\u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435. \u041e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0444\u043e\u0440\u043c\u0430\u0442 Terminfo, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u043a\u043e\u043c\u0435\u0441\u0442\u0430, \u0446\u0432\u0435\u0442\u0430, \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0432\u0438\u0448 \u0438 \u0432\u0441\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 SYSV curses. \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 linux, \u0442\u043e \u0432\u044b \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0438\u0434\u0435\u043b\u0438 \u0435\u0433\u043e \u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438: midnight commander,<br \/>  ncftp, Iptraf, trafshow \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 <i>ncurser<\/i> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/li>\n<li><b>\u041e\u043a\u043d\u043e<\/b> \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043b\u0438\u0448\u044c \u0441\u0435\u043a\u0446\u0438\u044e \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ncurses.<\/li>\n<\/ul>\n<p>  <\/p>\n<h4>\u041e\u0442 \u0430\u0432\u0442\u043e\u0440\u0430<\/h4>\n<p>  \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 <i>ncurses<\/i> \u0432 php \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 <i>ncurses<\/i> \u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u0441\u0442\u0438\u043b\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 C, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438, \u0430 \u043d\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u043f\u044b\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 C \u0438\u043b\u0438 C++, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 <i>ncurses<\/i> \u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <i>ncurses<\/i> \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u044f\u0437\u044b\u043a\u043e\u043c, \u0442\u0430\u043a\u0438\u043c \u043a\u0430\u043a PHP.<\/p>\n<h4>\u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c<\/h4>\n<p>  \u0412\u0430\u043c \u043d\u0443\u0436\u0435\u043d PHP, \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441 \u043e\u043f\u0446\u0438\u0435\u0439 <code>-with-ncurses<\/code> \u043d\u0430 unix-\u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041d\u0435 \u0432\u0441\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0446\u0432\u0435\u0442\u043d\u043e\u0439 \u0432\u044b\u0432\u043e\u0434, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043d\u0435 \u0441\u0442\u0430\u043b \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0446\u0432\u0435\u0442\u043e\u0432 \u0432 \u0441\u0442\u0430\u0442\u044c\u044e.<\/p>\n<p>  \u0417\u043d\u0430\u0439\u0442\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u00ab\u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c\u00bb \u0432\u0430\u0448 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 <i>reset<\/i>. \u0415\u0441\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043a\u0430\u043a\u0430\u044f-\u043b\u0438\u0431\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u0438 <code>ncurses_end()<\/code> \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d, \u0442\u043e \u0432\u0430\u0448 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<p>  \u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0438\u0436\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0442\u043e\u0436\u0435 \u0432\u0430\u0436\u0435\u043d. PHP \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443, \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043e\u043a\u043d\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0441\u043b\u043e\u0436\u043d\u043e\u043c\u0443.<\/p>\n<h3>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043e\u043a\u043d\u0430\u043c\u0438<\/h3>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043e\u043a\u043d\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e. \u041f\u043e\u0442\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u043e\u043a\u043d\u043e \u043f\u043e\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0442\u0443\u0434\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0442\u0435\u043a\u0441\u0442\u0430. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/c5a\/b4d\/0ea\/c5ab4d0ea15c81965f7961f7968c84f1.gif\" alt=\"image\"\/><\/p>\n<p>  \u041d\u0430\u0447\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u0441 \u0432\u044b\u0437\u043e\u0432\u0430 <code>ncurses_init();<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0440\u0435\u0436\u0438\u043c ncurses. \u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 PHP \u0431\u0443\u0434\u0435\u0442 \u043f\u0430\u0434\u0430\u0442\u044c \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439.<\/p>\n<p>  <b>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0434\u0432\u0443\u0445 \u043e\u043a\u043e\u043d \u0438 \u0441\u0442\u0440\u043e\u043a\u0438<\/b>  <\/p>\n<pre><code class=\"php\">&lt;?php \/\/ \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 $ncurse = ncurses_init(); \/\/ \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d $fullscreen = ncurses_newwin ( 0, 0, 0, 0);  \/\/ \u0440\u0438\u0441\u0443\u0435\u043c \u0440\u0430\u043c\u043a\u0443 \u0432\u043e\u043a\u0440\u0443\u0433 \u043e\u043a\u043d\u0430 ncurses_border(0,0, 0,0, 0,0, 0,0); \/\/ \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0432\u0442\u043e\u0440\u043e\u0435 \u043e\u043a\u043d\u043e $small = ncurses_newwin(10, 30, 7, 25); \/\/ \u0440\u0430\u043c\u043a\u0430 \u0434\u043b\u044f \u043d\u0435\u0433\u043e ncurses_wborder($small,0,0, 0,0, 0,0, 0,0);  ncurses_refresh(); \/\/ \u0440\u0438\u0441\u0443\u0435\u043c \u043e\u043a\u043d\u0430  \/\/ \u043f\u0438\u0448\u0435\u043c \u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u043c \u043e\u043a\u043d\u0435 ncurses_mvwaddstr($small, 5, 5, &quot;   Test  String   &quot;);  \/\/ \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0435 \u043e\u043a\u043d\u043e \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 ncurses_wrefresh($small);  $pressed = ncurses_getch(); \/\/ \u0436\u0434\u0451\u043c \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0448\u0438  ncurses_end(); \/\/ \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 ncurses, \u0447\u0438\u0441\u0442\u0438\u043c \u044d\u043a\u0440\u0430\u043d <\/code><\/pre>\n<p>  \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u043e\u043a\u043d\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0435\u0449\u0451 \u0440\u0430\u0437. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u043e\u043f\u044f\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c \u0440\u043e\u0432\u043d\u043e \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043a\u0430\u043a\u043e\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u043e \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0439 \u043d\u0430 \u043a\u043b\u0430\u0432\u0438\u0448\u0443, \u0438\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u0430\u043a\u0443\u044e-\u043b\u0438\u0431\u043e \u043a\u043d\u043e\u043f\u043a\u0443. \u042f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e esc (27 ascii-\u043a\u043e\u0434).<br \/>  \u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c <b>\u0432\u044b\u0445\u043e\u0434\u0430 \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 ESC<\/b>, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u043c\u0435\u0441\u0442\u043e <code>$pressed = ncurses_getch();<\/code>  <\/p>\n<pre><code class=\"php\">while (true) { \t$pressed = ncurses_getch(); \/\/ \u0436\u0434\u0451\u043c \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \tif ($pressed == 27) { \t\tbreak; \t} else { \tncurses_mvwaddstr($small, 5, 5, $pressed); \tncurses_wrefresh($small); \t} }<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u0436\u043c\u0451\u0442\u0435 esc, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f, \u0432 \u0438\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 ascii-\u043a\u043e\u0434 \u043d\u0430\u0436\u0430\u0442\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0451\u043d \u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u043c \u043e\u043a\u043d\u0435.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e <b>\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a<\/b>, \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0432 \u043a\u043e\u0434 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0437\u043e\u0432\u043e\u043c <code>ncurses_refresh();<\/code>:  <\/p>\n<pre><code class=\"php\">ncurses_attron(NCURSES_A_REVERSE); ncurses_mvaddstr(0,1,&quot;My first ncurses application&quot;); ncurses_attroff(NCURSES_A_REVERSE);<\/code><\/pre>\n<p>  \u0412\u044b \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u044b \u0440\u0435\u0436\u0438\u043c\u043e\u043c REVERSE (\u0446\u0432\u0435\u0442 \u0438 \u0444\u043e\u043d \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043c\u0435\u0441\u0442\u0430\u043c\u0438), \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c DIM, UNDERLINE \u0438 \u0434\u0440\u0443\u0433\u0438\u0435.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043a\u043e\u043c\u0444\u043e\u0440\u0442, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0438\u0437 \u043c\u0435\u043d\u044e. <\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u043c\u0435\u043d\u044e<\/h3>\n<p>  \u041c\u043d\u043e\u0433\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438\u043c\u0435\u044e\u0442 \u043c\u0435\u043d\u044e \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u0430 \u0438\u0437 \u043d\u0435\u0433\u043e. \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u043d\u0430 \u00ab\u0447\u0438\u0441\u0442\u043e\u043c\u00bb PHP \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u043b\u0438\u0448\u044c \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0438 \u0434\u0430\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0432\u0435\u0441\u0442\u0438 \u043d\u043e\u043c\u0435\u0440 \u043d\u0443\u0436\u043d\u043e\u0433\u043e. \u0422\u0430\u043a\u043e\u0439 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/fe8\/c36\/eb6\/fe8c36eb647c7a6bafe2120f6e8fcfb7.gif\" alt=\"image\"\/><\/p>\n<p>  <b>\u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0432\u044b\u0432\u043e\u0434\u0430 \u043c\u0435\u043d\u044e \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0432\u044b\u0431\u043e\u0440\u0430<\/b>  <\/p>\n<pre><code class=\"php\">&lt;?php define('ESCAPE_KEY', 27); $ncurse = ncurses_init(); $fullscreen = ncurses_newwin ( 0, 0, 0, 0);  ncurses_border(0,0, 0,0, 0,0, 0,0); $small = ncurses_newwin(10, 30, 7, 25); ncurses_wborder($small,0,0, 0,0, 0,0, 0,0); ncurses_attron(NCURSES_A_REVERSE); ncurses_mvaddstr(0,1,&quot;My first ncurses application&quot;); ncurses_attroff(NCURSES_A_REVERSE); ncurses_refresh();  $currently_selected = 0; $menu = array('one', 'two', 'three', 'four');  while (true) { \tfor($i=0; $i&lt;count($menu); $i++){ \t\t$out = $menu[$i]; \t\tif($currently_selected == intval($i)){  \t\t\tncurses_wattron($small,NCURSES_A_REVERSE); \t\t\tncurses_mvwaddstr($small, 1+$i, 1, $out); \t\t\tncurses_wattroff($small,NCURSES_A_REVERSE); \t\t} else { \t\t\tncurses_mvwaddstr($small, 1+$i, 1, $out); \t\t} \t}  \tncurses_wrefresh($small);  \t$pressed = ncurses_getch();  \tif ($pressed == NCURSES_KEY_UP) { \t\t$currently_selected--;  \t\tif ($currently_selected &lt; 0) \t\t\t$currently_selected = 0; \t} elseif ($pressed == NCURSES_KEY_DOWN) { \t\t$currently_selected++; \t\tif ($currently_selected &gt;= count($menu)) \t\t\t$currently_selected = count($menu)-1; \t} elseif($pressed == ESCAPE_KEY) { \t\tbreak; \t} else { \tncurses_mvwaddstr($small, 5, 5, $pressed); \t} }  ncurses_end(); <\/code><\/pre>\n<p>  \u041f\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0435\u043c\u0443\u0441\u044f \u043c\u0435\u043d\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438 \u0441\u043e \u0441\u0442\u0440\u0435\u043b\u043a\u0430\u043c\u0438 \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e esc.<\/p>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u0443\u043c\u0430\u0435\u0442\u0435 \u043e \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c, \u0437\u043d\u0430\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0414\u0430\u043b\u0435\u0435 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<h3>\u0412\u0441\u0451 \u0432\u043c\u0435\u0441\u0442\u0435<\/h3>\n<p>  \u041d\u0430 \u0441\u0430\u0439\u0442\u0435 php.net \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b 119 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 ncurses. \u0412 \u043d\u0438\u0436\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0435\u0441\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e. \u0417\u0430\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. <i>(\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430: \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0430 php.net, \u043f\u0440\u0430\u0432\u0434\u0430 \u0431\u0435\u0437 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f).<\/i>  <\/p>\n<table>\n<tr>\n<th>\u0424\u0443\u043d\u043a\u0446\u0438\u044f<\/th>\n<th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th>\n<th>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/th>\n<\/tr>\n<tr>\n<td><b>ncurses_init<\/b><\/td>\n<td>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 ncurses<\/td>\n<td><a href=\"http:\/\/www.php.net\/manual\/en\/function.ncurses-init.php\">www.php.net\/manual\/en\/function.ncurses-init.php<\/a><\/td>\n<\/tr>\n<tr>\n<td><b>ncurses_newwin<\/b><\/td>\n<td>\u0421\u043e\u0437\u0434\u0430\u0451\u0442 \u043d\u043e\u0432\u043e\u0435 \u043e\u043a\u043d\u043e<\/td>\n<td><a href=\"http:\/\/www.php.net\/manual\/en\/function.ncurses-newwin.php\">www.php.net\/manual\/en\/function.ncurses-newwin.php<\/a><\/td>\n<\/tr>\n<tr>\n<td><b>ncurses_getmaxyx<\/b>(resource window, int<br \/>  return Y, int return X);<\/td>\n<td>\u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 X \u0438 Y \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430<\/td>\n<td>\u2013<\/td>\n<\/tr>\n<tr>\n<td><b>ncurses_border<\/b><\/td>\n<td>\u0420\u0438\u0441\u0443\u0435\u0442 \u0440\u0430\u043c\u043a\u0443 \u0432\u043e\u043a\u0440\u0443\u0433 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430<\/td>\n<td><a href=\"http:\/\/www.php.net\/manual\/en\/function.ncurses-border.php\">www.php.net\/manual\/en\/function.ncurses-border.php<\/a><\/td>\n<\/tr>\n<tr>\n<td><b>ncurses_refresh<\/b><\/td>\n<td>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043e\u043a\u043d\u043e. \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <b>ncurses_wrefresh<\/b><\/td>\n<td><a href=\"http:\/\/www.php.net\/manual\/en\/function.ncurses-refresh.php\">www.php.net\/manual\/en\/function.ncurses-refresh.php<\/a><\/td>\n<\/tr>\n<tr>\n<td><b>ncurses_attron<\/b><\/td>\n<td>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043a \u0432\u044b\u0432\u043e\u0434\u0438\u043c\u043e\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u0443<\/td>\n<td><a href=\"http:\/\/www.php.net\/manual\/en\/function.ncurses-attron.php\">www.php.net\/manual\/en\/function.ncurses-attron.php<\/a><\/td>\n<\/tr>\n<tr>\n<td><b>ncurses_attroff<\/b><\/td>\n<td>\u041e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430<\/td>\n<td><a href=\"http:\/\/www.php.net\/manual\/en\/function.ncurses-attroff.php\">www.php.net\/manual\/en\/function.ncurses-attroff.php<\/a><\/td>\n<\/tr>\n<tr>\n<td><b>ncurses_mvaddstr<\/b><\/td>\n<td>\u0412\u044b\u0432\u043e\u0434\u0438\u0442 \u0441\u0442\u0440\u043e\u043a\u0443<\/td>\n<td><a href=\"http:\/\/www.php.net\/manual\/en\/function.ncurses-mvaddstr.php\">www.php.net\/manual\/en\/function.ncurses-mvaddstr.php<\/a><\/td>\n<\/tr>\n<tr>\n<td><b>ncurses_wborder<\/b> (resource window, int<br \/>  left, int right, int top, int bottom, int tl_corner, int tr_corner, int<br \/>  bl_corner, int br_corner);<\/td>\n<td>\u0420\u0438\u0441\u0443\u0435\u0442 \u0440\u0430\u043c\u043a\u0443 \u0434\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u043a\u043d\u0430.<\/td>\n<td>\u2013<\/td>\n<\/tr>\n<tr>\n<td><b>ncurses_wattron<\/b>(resource window, int<br \/>  attribute)<\/td>\n<td>\u0418\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e <b>ncurses_attron<\/b>, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043a\u043d\u0430 <i>window<\/i><\/td>\n<td>\u2013<\/td>\n<\/tr>\n<tr>\n<td><b>ncurses_mvwaddstr<\/b><\/td>\n<td>\u041f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0435 \u043e\u043a\u043d\u043e<\/td>\n<td><a href=\"http:\/\/www.php.net\/manual\/en\/function.ncurses-mvwaddstr.php\">www.php.net\/manual\/en\/function.ncurses-mvwaddstr.php<\/a><\/td>\n<\/tr>\n<tr>\n<td><b>ncurses_wattroff<\/b> (resource window, int<br \/>  attribute)<\/td>\n<td>\u0418\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e <b>ncurses_wattroff<\/b>, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043a\u043d\u0430 <i>window<\/i><\/td>\n<td>\u2013<\/td>\n<\/tr>\n<tr>\n<td><b>ncurses_wrefresh<\/b><\/td>\n<td>\u041f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0435 \u043e\u043a\u043d\u043e.<\/td>\n<td><a href=\"http:\/\/www.php.net\/manual\/en\/function.ncurses-wrefresh.php\">www.php.net\/manual\/en\/function.ncurses-wrefresh.php<\/a><\/td>\n<\/tr>\n<tr>\n<td><b>ncurses_getch<\/b><\/td>\n<td>\u0416\u0434\u0451\u0442 \u0432\u0432\u043e\u0434\u0430 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0438\u043b\u0438 \u043c\u044b\u0448\u0438.<\/td>\n<td><a href=\"http:\/\/www.php.net\/manual\/en\/function.ncurses-getch.php\">www.php.net\/manual\/en\/function.ncurses-getch.php<\/a><\/td>\n<\/tr>\n<\/table>\n<h3>\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0439 traceroute<\/h3>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443: traceroute \u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c whois-\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0440\u044b\u0436\u043a\u0435.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/c1b\/a3a\/4a2\/c1ba3a4a25d6c5049c1f6179ac0658be.gif\" alt=\"image\"\/><\/p>\n<p>  \u042d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 traceroute \u0434\u043e <i>zend.com<\/i> (\u043c\u0430\u043a\u0441 10 \u043f\u0440\u044b\u0436\u043a\u043e\u0432) \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u043e\u043a\u043d\u0435. \u041f\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0440\u0435\u043b\u043e\u043a. \u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 enter \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0434\u0430\u043d\u043d\u043e\u043c ip \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u043e\u043a\u043d\u0435. \u041f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 esc \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  \/\/ \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043e\u043a define(&quot;ESCAPE_KEY&quot;, 27); define(&quot;ENTER_KEY&quot;, 13);  \/\/ \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 $tr_return = traceroute(&quot;www.zend.com&quot;); array_shift($tr_return); $ncurses_session = ncurses_init(); $main = ncurses_newwin(0, 0, 0, 0); \/\/ \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043e\u043a\u043d\u043e ncurses_getmaxyx($main, $lines, $columns); ncurses_border(0, 0, 0, 0, 0, 0, 0, 0);  \/\/ \u0440\u0430\u043c\u043a\u0430 \u0434\u043b\u044f \u043e\u043a\u043d\u0430 ncurses_attron(NCURSES_A_REVERSE); ncurses_mvaddstr(0,1, &quot;Traceroute example&quot;); ncurses_attroff(NCURSES_A_REVERSE);  \/\/ \u043e\u043a\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044c\u0448\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 ... $lower_frame_window = ncurses_newwin ($lines-14, $columns-3, 13, 1); ncurses_wborder($lower_frame_window, 0,0, 0,0, 0,0, 0,0); \/\/ \u043e\u0431\u0440\u0430\u043c\u0438\u043c $lower_main_window = ncurses_newwin ($lines - 16, $columns-5, 15, 2); $main_list_window = ncurses_newwin (12, $columns-3, 1, 1); ncurses_wborder($main_list_window, 0,0, 0,0, 0,0, 0,0); \/\/ \u043e\u0431\u0440\u0430\u043c\u0438\u043c ncurses_refresh();  $currently_selected = 0; while(true) { \t\tfor($a=0; $a &lt; count($tr_return); $a++){ \t\t\t$out = $tr_return[$a]; \t\t\tif($currently_selected == intval($a)) { \t\t\t\tncurses_wattron($main_list_window,NCURSES_A_REVERSE); \t\t\t\tncurses_mvwaddstr ($main_list_window, 1+$a, 1, $out); \t\t\t\tncurses_wattroff($main_list_window,NCURSES_A_REVERSE); \t\t\t} else { \t\t\t\tncurses_mvwaddstr ($main_list_window, 1+$a, 1, $out); \t\t\t}  \t\t}   \tncurses_move(-1,1); \/\/ \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043a\u0443\u0440\u0441\u043e\u0440 \u0438\u0437 \u043f\u043e\u043b\u044f \u0437\u0440\u0435\u043d\u0438\u044f \tncurses_wrefresh($lower_frame_window); \tncurses_wrefresh($lower_main_window); \/\/ \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u043e\u043a\u043d\u0430 \tncurses_wrefresh($main_list_window); \t\/\/ \u0436\u0434\u0451\u043c \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \t$y = ncurses_getch($lower_main_window);  \tif ($y == ENTER_KEY) { \t\t$newout = explode(&quot; &quot;, trim($tr_return[$currently_selected])); \t\t$rwhois_return = rwhois($newout[2]);  \t\tforeach ($rwhois_return as $n =&gt; $l) { \t\t\tncurses_mvwaddstr($lower_main_window, $n - 1, 1, $l); \t\t} \t} elseif($y == ESCAPE_KEY) { \t\tncurses_end(); \t\texit; \t} elseif ($y == NCURSES_KEY_UP) { \t\t$currently_selected--; \t\tif ($currently_selected &lt; 0) \t\t\t$currently_selected = 0; \t} elseif($y == NCURSES_KEY_DOWN) { \t\t$currently_selected++; \t\tif ($currently_selected &gt;= count($tr_return)) \t\t\t$currently_selected = count($tr_return)-1; \t}  }  \/\/ \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445  function traceroute($address) { \texec(&quot;traceroute -n -m 10 $address&quot;, $trreturn); \treturn $trreturn; }  \/\/ reverse whois function rwhois($query) { \t$fp = fsockopen (&quot;rwhois.arin.net&quot;, 4321, $errno, $errstr, 30); \tif (!$fp) { \t\t\t$ret[] = &quot;$errstr ($errno)\\n&quot;; \t} else { \t\t\tfputs($fp, &quot;$query\\r\\n&quot;); \t\t\twhile (!feof($fp)) { \t\t\t\t$back = trim(fgets ($fp, 256)); \t\t\t\tif (empty($back) || stripos($back, ':') === false || substr($back, 0, 1) == '#') \t\t\t\t\tcontinue; \t\t\t\t$ret[] = $back; \t\t\t}\/\/wend \t\t  fclose ($fp); \t} \treturn $ret; } <\/code><\/pre>\n<\/div>\n<\/div>\n<h3>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u0412\u044b\u0448\u0435 \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442 \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0431\u0430\u0437\u043e\u0439 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <i>ncurses<\/i>.<\/p>\n<p>  \u041c\u044b \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u044b\u0448\u0438, \u0446\u0432\u0435\u0442\u043e\u0432 \u0438 \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432\u044b\u0432\u043e\u0434\u0430.<\/p>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u0442\u0435 \u043d\u0430\u0431\u043e\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432\u044b\u0432\u043e\u0434\u0430. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0442\u0430\u0440\u0442\u0430 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u0430\u043c \u0434\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043f\u0440\u043e\u0441\u0442\u044f\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u043a\u043e\u043d. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0430\u043d\u0435\u043b\u0435\u0439, \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u0432 \u0438\u043b\u0438 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0435\u0449\u0451.<\/p>\n<pre><code class=\"php\">\/** Creates an ncurses window that is write-safe on the left-hand side of the screen \t* @param integer $size is how wide it will be \t* @return window handle of inner window. \t*\/ function left_window($size=15){ \tglobal $fullscreen; \tncurses_getmaxyx($fullscreen, $MAX_Y, $MAX_X); \t$c = ncurses_newwin ($MAX_Y-2 ,$size, 1, 1); \tncurses_wborder($c,0,0, 0,0, 0,0, 0,0); \/\/ border it \t\/\/ now create window overtop the other just \t\/\/ slightly smaller so that we won't write over \t\/\/ the border. \t$d = ncurses_newwin ($MAX_Y-4 ,$size-2, 1+1, 2); \tncurses_wrefresh($c); \/\/ show it \tncurses_wrefresh($d);  \treturn $d; }  # # creates an upper-right window # function upperr_window($size=15){ \tglobal $fullscreen; \tncurses_getmaxyx($fullscreen, $MAX_Y, $MAX_X); \t$c = ncurses_newwin ($size ,$size, 1, $MAX_X-($size+1)); \tncurses_wborder($c,0,0, 0,0, 0,0, 0,0); \/\/ border it \tncurses_wrefresh($c); \/\/ show it \treturn $c; }<\/code><\/pre>\n<p>  \u0423\u0434\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f!<\/p>\n<h5>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h5>\n<p>  <\/p>\n<ul>\n<li><a href=\"http:\/\/www.opengroup.org\/onlinepubs\/007908799\/xcurses\/curses.h.html\">www.opengroup.org\/onlinepubs\/007908799\/xcurses\/curses.h.html<\/a> \u2014 \u044d\u0442\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443 ncurses, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u043c \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u043f\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/li>\n<li><a href=\"http:\/\/dickey.his.com\/ncurses\/ncurses-intro.html\">dickey.his.com\/ncurses\/ncurses-intro.html<\/a> \u2014 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e ncurses \u0432 \u044f\u0437\u044b\u043a\u0435 C. \u041c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u0438\u0437 \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441 PHP.<\/li>\n<li>\u0418 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>man ncurses<\/code>. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043a\u0430\u0436\u0434\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441\u043f\u0440\u0430\u0432\u043a\u0438 (\u043d\u0430\u043f\u0440. <code>man wborder<\/code><\/li>\n<\/ul>\n<h5>\u041e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430<\/h5>\n<p>  <b>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f ncurses<\/b>  <\/p>\n<ol>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c pecl. \u041f\u0430\u043a\u0435\u0442 <i>php5-dev<\/i> \u0432 ubuntu, <i>php-pear<\/i> \u0432 arch<\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0430\u043c\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435: <code>pecl install ncurses<\/code> (\u043f\u0440\u0430\u0432\u0430 \u0440\u0443\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441 sudo)<\/li>\n<li>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435. \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u00abextension=ncurses.so\u00bb \u0432 \u0441\u0432\u043e\u0439 php.ini<\/li>\n<\/ol>\n<p>  \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f: <a href=\"http:\/\/devzone.zend.com\/173\/using-ncurses-in-php\/\">devzone.zend.com\/173\/using-ncurses-in-php\/<\/a><br \/>  <sub><i>\u041f\u0440\u043e\u0448\u0443 \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u043e\u0431 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430\u0445 \u0432 \u043b\u0441<\/i><\/sub> \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/186570\/\"> http:\/\/habrahabr.ru\/post\/186570\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u041a\u0430\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0438 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0432\u044b \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0438\u0448\u0435\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430 php \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0430\u0439\u0442\u0430 \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438. \u0421\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u044f\u0437\u044b\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0432\u043e\u0434\u044f\u0449\u0443\u044e\/\u0447\u0438\u0442\u0430\u044e\u0449\u0443\u044e \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <i>ncurses<\/i> \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443 \u0441 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0432\u0438\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0438\u0434\u0430\u0445 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u0432.<\/p>\n<p>  PHP \u043e\u0447\u0435\u043d\u044c \u0433\u0438\u0431\u043e\u043a \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c, \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 (Perl\/bash-\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0438 \u043f\u0440\u043e\u0447\u0435\u0435). \u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c <i>ncurses<\/i> \u043f\u043e\u0440\u0430\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u0430 \u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u043c php-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u0434\u0430\u0442\u044c \u0432\u0430\u043c \u00ab\u0442\u043e\u043b\u0447\u043e\u043a\u00bb \u0432 \u0441\u0444\u0435\u0440\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0445 \u0443\u0442\u0438\u043b\u0438\u0442 \u043d\u0430 php, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u042f \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0435\u0435\u0441\u044f \u043a \u0441\u0430\u043c\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, \u0438 \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0434\u0430\u0442\u044c \u0432\u0430\u043c \u0431\u0430\u0437\u0443 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f ncurses \u0432 \u0432\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438.<\/p>\n<h6>\u0414\u043b\u044f \u043a\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f<\/h6>\n<p>  \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u043e\u043f\u044b\u0442\u043d\u044b\u0445 php-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432, \u0437\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0445 php-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c. <i>(\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430: \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u043b\u044e\u0431\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e).<\/i>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-186570","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/186570","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=186570"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/186570\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=186570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=186570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=186570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}