{"id":270762,"date":"2015-12-21T10:04:02","date_gmt":"2015-12-21T07:04:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=270762"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=270762","title":{"rendered":"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 comet \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 saas comet \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0447\u0430\u0442\u0430"},"content":{"rendered":"<p>       Comet \u2014 \u043b\u044e\u0431\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0435 HTTP-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c (push) \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0443 \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.<\/p>\n<p>  \u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u043c\u0435\u0441\u0442\u043e \u043a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b.  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/fab\/427\/3de\/fab4273dec734b7f902d4e61cf6b84d5.png\" width=\"600\" alt=\"\u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u043c\u0435\u0441\u0442\u043e \u043a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b.\" \/><\/div>\n<p> <a name=\"habracut\"><\/a><br \/>  \u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.   <\/p>\n<ol>\n<li>\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441\u0430\u0439\u0442\u0430<\/li>\n<li>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b JavaScript \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 comet \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c.<\/li>\n<li>\u041f\u043e\u043a\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u043d \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Api \u043a \u043a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0435\u043c\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.<\/li>\n<li>\u041a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440.<\/li>\n<li>JavaScript Api \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0430\u0451\u0442 \u0432 \u0432\u0430\u0448 collback<\/li>\n<\/ol>\n<h1><font color=\"#2b73b7\">\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b<\/font><\/h1>\n<p>  \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435 \u043c\u0430\u043b\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f WebSockets, \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Polling, Long polling, \u00ab\u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439\u00bb iframe \u0438 Flash \u0441\u043e\u043a\u0435\u0442\u044b \u0443\u0436\u0435 \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0435\u0431\u0441\u043e\u043a\u0435\u0442\u044b \u0443\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f <a href=\"http:\/\/caniuse.com\/#search=WebSockets\">\u0432\u0441\u0435\u043c \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438<\/a>.<\/p>\n<h1><font color=\"#2b73b7\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432<\/font><\/h1>\n<p>  \u0411\u0443\u0434\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u043e \u0435\u0441\u043b\u0438 \u043a\u0442\u043e \u0442\u043e \u0435\u0449\u0451 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043d\u0430 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b.  <\/p>\n<table>\n<tr>\n<td>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435<\/td>\n<td>\u041b\u0438\u0446\u0435\u043d\u0437\u0438\u044f<\/td>\n<td>API<\/td>\n<\/tr>\n<tr>\n<td><a href=\"http:\/\/habrahabr.ru\/post\/268717\/\">Centrifuge<\/a><\/td>\n<td>MIT<\/td>\n<td>Python, Ruby, Java, PHP<\/td>\n<\/tr>\n<tr>\n<td><a href=\"http:\/\/habrahabr.ru\/post\/79189\/\">dklab_realplexor<\/a><\/td>\n<td>GPL<\/td>\n<td>PHP<\/td>\n<\/tr>\n<tr>\n<td><a href=\"http:\/\/comet-server.ru\/menu_id\/10\">comet-server.ru<\/a><\/td>\n<td>\u041a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441,<br \/>   \u0421 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u043d\u0430 \u0441\u0432\u043e\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/td>\n<td> Delphi, C, C++, \u042d\u0439\u0444\u0435\u043b\u044c, Java, \u041b\u0438\u0441\u043f, Perl,<br \/>   PHP, Python, Ruby, Smalltalk, Node.js,<br \/>   Bash, \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u044b\u0439 \u041f\u0430\u0441\u043a\u0430\u043b\u044c \u0438 Tcl<br \/>   (\u0412\u0441\u0435 \u044f\u0437\u044b\u043a\u0438 \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0435\u0441\u0442\u044c MySQL \u043a\u043b\u0438\u0435\u043d\u0442)<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/fanout.io\/pricing\/\">fanout.io<\/a><\/td>\n<td>\u041a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441,<br \/>   \u0421 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u043d\u0430 \u0441\u0432\u043e\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/td>\n<td> Python, Ruby, PHP, Node, Go, Django<\/td>\n<\/tr>\n<tr>\n<td><a href=\"http:\/\/pusher.com\/pricing\">pusher.com<\/a><\/td>\n<td>\u041a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441<\/td>\n<td>REST API \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f Ruby, PHP, .NET,<br \/>   Node.js, Python<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.hydna.com\/plans-and-pricing\/\">hydna.com<\/a> <\/td>\n<td>\u041a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441<\/td>\n<td>C++, Erlang, Go (Push only), Java, JavaScript,<br \/>   Julia (Push only), Lua (Push only), .NET, Node.js,<br \/>   Objective-C, PHP (Push only), Python (Push only),<br \/>   Ruby (Push only)<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.tambur.io\/pricing\">tambur.io<\/a><\/td>\n<td>\u041a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441<\/td>\n<td>Ruby, Python, PHP, Java, Erlang<\/td>\n<\/tr>\n<\/table>\n<p>\u0415\u0441\u0442\u044c \u0435\u0449\u0451 <a href=\"http:\/\/cometdaily.com\/maturity.html\">\u0441\u0432\u043e\u0434\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u043a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432<\/a> \u043d\u043e \u043e\u043d\u0430 \u0434\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0430\u0436 2009 \u0433\u043e\u0434\u043e\u043c<\/p>\n<h1><font color=\"#2b73b7\">\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0447\u0430\u0442\u0430 \u043d\u0430 php<\/font><\/h1>\n<p>  \u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0447\u0430\u0442\u0430. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"http:\/\/comet-server.ru\">comet-server.ru<\/a>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/164\/3cd\/f84\/1643cdf848544901913bd1c3a9af9b3a.png\" width=\"600\" \/><\/div>\n<p>  \u0427\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<ul>\n<li>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0438 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JavaScript Api \u043d\u0430 \u043a\u0430\u043d\u0430\u043b \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0447\u0430\u0442\u0430.<\/li>\n<li>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 ajax \u043d\u0430 php \u0441\u0435\u0440\u0432\u0435\u0440. <\/li>\n<li>PHP \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442, \u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043a \u0441\u0435\u0431\u0435 \u0432 \u0411\u0414 \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441 \u043d\u0438\u043c \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e.<\/li>\n<li>\u0417\u0430\u0442\u0435\u043c php \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0435\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u043a\u0430\u043d\u0430\u043b.<\/li>\n<li>\u041a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u043e\u0442 php \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u0441\u044b\u043b\u0430\u0435\u0442 \u0432\u0441\u0435\u043c \u043a\u0442\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d \u043d\u0430 \u043a\u0430\u043d\u0430\u043b.<\/li>\n<\/ul>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438\u0437 \u0447\u0430\u0442\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">&lt;!DOCTYPE HTML&gt; &lt;html&gt; &lt;head&gt;     &lt;!-- \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 --&gt;     &lt;script src=&quot;\/\/comet-server.ru\/CometServerApi.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;     &lt;script src=&quot;\/\/comet-server.ru\/doc\/CometQL\/simplePhpChat\/jquery.min.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt; &lt;\/head&gt; &lt;body&gt;  &lt;!-- \u0411\u043b\u043e\u043a \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 --&gt; &lt;div id=&quot;textHolder&quot; style=&quot;margin-top:10px; border:1px solid #000;padding:10px;&quot;&gt;&lt;\/div&gt; &lt;hr&gt; &lt;input type=&quot;text&quot; id=&quot;msgText&quot; placeholder=&quot;\u0422\u0435\u043a\u0441\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f&quot;&gt;&lt;input type=&quot;button&quot; value=&quot;\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c&quot;  onclick=&quot;sendMsg();&quot;&gt;  \u0414\u043b\u044f \u0441\u0432\u044f\u0437\u0438 \u0441 \u043a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f &lt;a href=&quot;http:\/\/comet-server.ru\/wiki\/doku.php\/comet:cometql&quot;&gt;CometQL&lt;\/a&gt;. CometQL - \u044d\u0442\u043e api \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 MySQL. &lt;script type=&quot;text\/javascript&quot;&gt; $(document).ready(function(){      \/**       * \u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u0437 \u043a\u0430\u043d\u0430\u043b\u0430 SimplePhpChat      *\/     CometServer().subscription(&quot;SimplePhpChat&quot;, function(event){         console.log(&quot;\u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438\u0437 \u043a\u0430\u043d\u0430\u043b\u0430 SimplePhpChat&quot;,  event.data, event);         $(&quot;#textHolder&quot;).html( $(&quot;#textHolder&quot;).html() +&quot;&lt;hr&gt;&quot;+event.data);     })      \/**       * \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u043a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0443. \u0414\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b.      * dev_id \u0432\u0430\u0448 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0443\u043a\u0430\u0442\u043e\u0440 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430      *\/     CometServer().start({dev_id:15 }) })  function sendMsg(){  \tvar text = $(&quot;#msgText&quot;).val(); \t     jQuery.ajax({         url: &quot;\/\/comet-server.ru\/doc\/CometQL\/simplePhpChat\/sendMsgToChat.php&quot;,         type: &quot;GET&quot;,         data:&quot;text=&quot;+encodeURIComponent(text),         success: function(){             $(&quot;#msgText&quot;).val('');         }     }); } &lt;\/script&gt; &lt;\/body&gt; &lt;\/html&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u0437 php<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"php\">&lt;?php  \/\/ \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u043a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0441 \u043b\u043e\u0433\u0438\u043d\u043e\u043c \u0438 \u043f\u0430\u0440\u043e\u043b\u0435\u043c \u0434\u043b\u044f \u0434\u0435\u043c\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 (\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 comet-server.ru ) \/\/ \u041b\u043e\u0433\u0438\u043d 15 \/\/ \u041f\u0430\u0440\u043e\u043b\u044c lPXBFPqNg3f661JcegBY0N0dPXqUBdHXqj2cHf04PZgLHxT6z55e20ozojvMRvB8 \/\/ \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 CometQL_v1 $link = mysqli_connect(&quot;app.comet-server.ru&quot;, &quot;15&quot;, &quot;lPXBFPqNg3f661JcegBY0N0dPXqUBdHXqj2cHf04PZgLHxT6z55e20ozojvMRvB8&quot;, &quot;CometQL_v1&quot;);  \/\/ \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u043a\u0430\u043d\u0430\u043b mysqli_query (  $link, &quot;INSERT INTO pipes_messages (name, event, message)VALUES('SimplePhpChat', '', '&quot;.mysqli_real_escape_string($link,htmlspecialchars($_GET['text'])).&quot;' );&quot; ); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u0435\u043c\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u0447\u0430\u0442\u0430 <a href=\"http:\/\/comet-server.ru\/doc\/CometQL\/simplePhpChat\/index.html\">\u0437\u0434\u0435\u0441\u044c<\/a>.<br \/>  <a href=\"http:\/\/comet-server.ru\/wiki\/doku.php\/comet:simple-chat-example\">\u0422\u0443\u0442<\/a> \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0447\u0430\u0442\u0430, \u043d\u043e \u0432 \u043d\u0451\u043c php \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0432\u0441\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 comet \u0441\u0435\u0440\u0432\u0435\u0440. \u0410 <a href=\"http:\/\/comet-server.ru\/wiki\/doku.php\/comet:chat-with-authorization\">\u0437\u0434\u0435\u0441\u044c<\/a> \u043f\u0440\u0438\u043c\u0435\u0440 \u0447\u0430\u0442\u0430 \u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043d\u0430 \u043a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.               <\/p>\n<div class=\"clear\"><\/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\/273573\/\"> http:\/\/habrahabr.ru\/post\/273573\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       Comet \u2014 \u043b\u044e\u0431\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0435 HTTP-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c (push) \u0434\u0430\u043d\u043d\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0443 \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.<\/p>\n<p>  \u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u043c\u0435\u0441\u0442\u043e \u043a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b.  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/fab\/427\/3de\/fab4273dec734b7f902d4e61cf6b84d5.png\" width=\"600\" alt=\"\u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043e \u043c\u0435\u0441\u0442\u043e \u043a\u043e\u043c\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b.\" \/><\/div>\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-270762","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/270762","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=270762"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/270762\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=270762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=270762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=270762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}