{"id":322497,"date":"2021-05-03T09:00:08","date_gmt":"2021-05-03T09:00:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=322497"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=322497","title":{"rendered":"\u0421\u0432\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 SMS-\u0448\u043b\u044e\u0437. \u0427\u0430\u0441\u0442\u044c 2 \u2013\u00a0\u0441\u043e\u0437\u0434\u0430\u0451\u043c API \u0438 \u0444\u043e\u0440\u043c\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/555422\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ux\/f9\/yf\/uxf9yfujrexmwue03tahisnka3s.jpeg\"><\/div>\n<p><\/a><br \/>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u043c \u0432\u0442\u043e\u0440\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0441\u0432\u043e\u0435\u0433\u043e \u0448\u043b\u044e\u0437\u0430.<br \/>  \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 Gammu, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043e\u0441\u043e\u0431\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 SMS \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u0421\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u2013 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u043a\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0443\u044e \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0443 (API), \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e \u0448\u043b\u044e\u0437\u043e\u043c \u043f\u0443\u0442\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u044d\u0442\u043e\u0442 API. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u044d\u0442\u043e \u043a\u043e\u043c\u0444\u043e\u0440\u0442, \u0432\u043e \u0432\u0442\u043e\u0440\u0443\u044e \u2013 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e, \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u0439:<br \/>  <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/554868\/\">\u0421\u0432\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 SMS-\u0448\u043b\u044e\u0437. \u0427\u0430\u0441\u0442\u044c 1 \u2013 \u0446\u0435\u043b\u0438, \u0437\u0430\u0434\u0430\u0447\u0438, \u0441\u0431\u043e\u0440\u043a\u0430 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/a><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2><font color=\"#3AC1EF\">\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/font><\/h2>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u044c \u043d\u0430\u0448 \u043a\u043e\u0434, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u0442 \u043d\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438 \u043a\u0430\u043a \u0441 \u043d\u0438\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u043f\u0430\u0440\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u043d\u0438\u0445 \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c.<\/p>\n<p>  <b>\u041d\u0430 \u0447\u0435\u043c \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c backend<\/b><br \/>  \u0422\u0443\u0442 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e, \u0447\u0442\u043e \u0443\u043c\u0435\u0435\u043c, \u043d\u0430 \u0442\u043e\u043c \u0438 \u043f\u0438\u0448\u0435\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2013 PHP<\/p>\n<p>  <b>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f<\/b><br \/>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e. \u0421\u0435\u0440\u0432\u0438\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430.<\/p>\n<p>  <b>\u041e\u0434\u0438\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u2013 \u043e\u0434\u043d\u0430 sim-\u043a\u0430\u0440\u0442\u0430?<\/b><br \/>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0435\u0442. \u0423 \u043d\u0430\u0441 \u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f \u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u043c\u0435\u0442\u044c \u043e\u0434\u0438\u043d \u043b\u043e\u0433\u0438\u043d, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043d\u043e\u043c\u0435\u0440\u043e\u0432. \u041d\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0448\u043b\u044e\u0437 \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<p>  <b>\u041a\u0430\u043a \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u044d\u0442\u0438\u043c API, \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/b><br \/>  \u041e\u0431\u0449\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 POST\/GET. \u0417\u0430\u043f\u0440\u043e\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0442\u0435\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0443\u043c\u0435\u044e\u0442 POST \u0438\u043b\u0438 \u0437\u0430\u043c\u043e\u0440\u043e\u0447\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c $_REQUEST. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435.<\/p>\n<p>  <b>\u041e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u2013 \u043e\u0434\u0438\u043d \u0430\u0434\u0440\u0435\u0441\u0430\u0442?<\/b><br \/>  \u041d\u0435\u0442. \u0412 \u043e\u0434\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0441 \u043e\u0434\u043d\u0438\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u043e\u0432. \u0421\u0443\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u044e \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u042d\u042d \u043d\u0430 \u0434\u0430\u0447\u0435 \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u0441\u0435 \u0441\u0432\u043e\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u044b, \u0430 \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0436\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0441\u0443\u043f\u0440\u0443\u0433\u0438\u2026 \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438 \u043d\u0435\u0442, \u0432\u0435\u0434\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0432\u0430\u0436\u043d\u043e\u0435.<\/p>\n<p>  <b>\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439<\/b><br \/>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u044d\u0442\u043e \u043d\u0430\u0448\u0430 \u0432\u0430\u0436\u043d\u0430\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u0436\u0438\u0437\u043d\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0435 \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0445\u0440\u0430\u043d\u0438\u043c<\/p>\n<p>  <b>\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u043a\u0430\u0440\u0442\u044b<\/b><br \/>  \u0414\u0430. \u041c\u044b \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u043c \u0447\u0443\u0432\u0441\u0442\u0432\u043e\u043c \u043c\u0435\u0440\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441 \u043e\u0434\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u044b \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0447\u0438\u0441\u043b\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0448\u043b\u044e\u0437\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u0430 \u0438\u0441\u0447\u0435\u0440\u043f\u0430\u043d\u0438\u0435 \u043b\u0438\u043c\u0438\u0442\u0430.<\/p>\n<h2><font color=\"#3AC1EF\">\u0417\u0430\u0434\u0430\u0447\u0430 \u043d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430, \u0446\u0435\u043b\u044c \u044f\u0441\u043d\u0430, \u0438\u0442\u0430\u043a \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c<\/font><\/h2>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435 \u0447\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u0411\u0435\u0437 \u043d\u0435\u0435, \u043f\u0440\u0438 \u043d\u0430\u0448\u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044f\u0445 \u043d\u0438\u043a\u0430\u043a. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c MySQL. <br \/>  \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0430\u0440\u0443 \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u044b \u0431\u044b\u043b\u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  <b>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0411\u0414 \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446<\/b><br \/>  \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u0431\u043b\u0438\u0446 \u0434\u043b\u044f:<\/p>\n<ul>\n<li><i>users<\/i> \u2013 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/li>\n<li><i>smsc_gateway<\/i> \u2013 \u0434\u0430\u043d\u043d\u044b\u0445 \u0448\u043b\u044e\u0437\u043e\u0432<\/li>\n<li><i>gateway_smscount<\/i> \u2013 \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0448\u043b\u044e\u0437\u0430 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043c\u0435\u0441\u044f\u0446<\/li>\n<li><i>sms_queue<\/i> \u2013 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439<\/li>\n<li><i>sms_archive<\/i> \u2013 \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439<\/li>\n<\/ul>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0411\u0414 \u2013 \u0434\u0430\u043c\u043f \u0442\u0430\u0431\u043b\u0438\u0446<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\"># \u0414\u0430\u043c\u043f \u0442\u0430\u0431\u043b\u0438\u0446\u044b users # ------------------------------------------------------------  CREATE TABLE `users` (   `id` int(11) NOT NULL AUTO_INCREMENT,   `uuid` varchar(10) NOT NULL,   `login` varchar(50) NOT NULL,   `password` varchar(32) NOT NULL,   `comment` varchar(200) NOT NULL,   `status` varchar(11) DEFAULT NULL,   PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  # \u0414\u0430\u043c\u043f \u0442\u0430\u0431\u043b\u0438\u0446\u044b smsc_gateway # ------------------------------------------------------------  CREATE TABLE `smsc_gateway` (   `id` int(20) NOT NULL AUTO_INCREMENT,   `gw_phone` varchar(11) NOT NULL DEFAULT '',   `uuid` varchar(10) NOT NULL,   `host` varchar(15) NOT NULL DEFAULT '',   `port` varchar(5) NOT NULL,   `password` varchar(12) DEFAULT '',   `maxcount` varchar(6) NOT NULL,   `status` int(1) NOT NULL,   `gateway_id` int(2) DEFAULT NULL,   `state` varchar(11) DEFAULT NULL,   `comment` varchar(100) NOT NULL,   PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  # \u0414\u0430\u043c\u043f \u0442\u0430\u0431\u043b\u0438\u0446\u044b gateway_smscount # ------------------------------------------------------------  CREATE TABLE `gateway_smscount` (   `id` int(20) NOT NULL AUTO_INCREMENT,   `gw_phone` varchar(11) NOT NULL DEFAULT '',   `date` varchar(10) NOT NULL,   `count` int(6) NOT NULL DEFAULT '0',   PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  # \u0414\u0430\u043c\u043f \u0442\u0430\u0431\u043b\u0438\u0446\u044b sms_queue # ------------------------------------------------------------  CREATE TABLE `sms_queue` (   `id` int(11) NOT NULL AUTO_INCREMENT,   `uuid` varchar(11) NOT NULL DEFAULT '',   `dateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,   `status` varchar(10) DEFAULT NULL,   `data` varchar(500) NOT NULL DEFAULT '',   `phone` varchar(11) NOT NULL DEFAULT '',   PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; # \u0414\u0430\u043c\u043f \u0442\u0430\u0431\u043b\u0438\u0446\u044b sms_archive # ------------------------------------------------------------  CREATE TABLE `sms_archive` (   `id` int(11) NOT NULL AUTO_INCREMENT,   `gateway_id` varchar(11) DEFAULT NULL,   `dateTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP,   `data` varchar(500) DEFAULT NULL,   `status` varchar(11) DEFAULT NULL,   `phone` varchar(11) DEFAULT NULL,   `uuid` varchar(11) DEFAULT NULL,   PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;<\/code><\/pre>\n<\/p><\/div>\n<\/p><\/div>\n<p>  \u0421\u0442\u043e\u0438\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0448\u043b\u044e\u0437\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u2013 smsc_gateway. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c:<\/p>\n<ul>\n<li><i>uuid<\/i> \u2013 id \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u0439 \u0448\u043b\u044e\u0437<\/li>\n<li><i>host<\/i> \u2013 ip-\u0430\u0434\u0440\u0435\u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 \u0441 \u043c\u043e\u0434\u0435\u043c\u0430\u043c\u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e ssh<\/li>\n<li><i>port<\/i> \u2013 \u043f\u043e\u0440\u0442 \u043c\u044b \u0442\u043e\u0436\u0435 \u0443\u043a\u0430\u0436\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 22-\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c port forwarding<\/li>\n<li><i>password<\/i> \u2013 \u043f\u0430\u0440\u043e\u043b\u044c ssh<\/li>\n<li><i>gw_phone<\/i> \u2013 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430<\/li>\n<li><i>maxcount<\/i> \u2013 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439<\/li>\n<li><i>status<\/i> \u2013 \u0441\u0442\u0430\u0442\u0443\u0441. 1 \u2014 \u0430\u043a\u0442\u0438\u0432\u0435\u043d, 0 \u2014 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d.<\/li>\n<li><i>gateway_id<\/i> \u2013 \u043a\u0430\u043d\u0430\u043b \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0434\u0435\u043c\u0430 \u0432 Gammu (\u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0443 \u043d\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0435\u043c\u043e\u0432)<\/li>\n<li><i>state<\/i> \u2013 \u0441\u0442\u0430\u0442\u0443\u0441 \u0448\u043b\u044e\u0437\u0430. lock \u2014 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d.<\/li>\n<li><i>comment<\/i> \u2013 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043c\u0435\u0442\u043a\u0438, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e<\/li>\n<\/ul>\n<p>  <b>\u041a\u043b\u0430\u0441\u0441\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u043e 5:<\/b><\/p>\n<ol>\n<li>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u2013 <i>Users_Auth.class.php<\/i><\/li>\n<li>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 PDO \u2013 <i>MYSQL_PDO.class.php<\/i><\/li>\n<li>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 SMS \u2013 <i>SMS_data_handle.class.php<\/i><\/li>\n<li>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 Gammu \u2013 <i>Gammu_SMS.class.php<\/i><\/li>\n<li>\u0412\u043e\u0437\u0432\u0440\u0430\u0442 http \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0432 json \u2013 <i>http_response.class.php<\/i><\/li>\n<\/ol>\n<p>  <i>\u0414\u0430\u043b\u044c\u0448\u0435 \u044f \u0431\u0443\u0434\u0443 \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u043a\u0430\u043a \u043f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e API \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u043d\u0430 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0442\u0430\u043a \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u0435\u0435 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435. \u0422\u0430\u043a\u0436\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043a\u0443\u0441\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u0430\u043c\u0438.<\/i><\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439.<\/p>\n<p>  \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438:<\/p>\n<blockquote><p>&#8230;\/smsc.php?login={user_name}&amp;pass={user_password}&amp;tel={phone_number}&amp;msg={message}&amp;flash=1&amp;replacemessages_id=1  <\/p><\/blockquote>\n<p>  \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f <i>flash<\/i> \u0438 <i>replacemessages<\/i> \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u0412 <i>{phone_number}<\/i> \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 &quot;,&quot;. + \u0432 \u043d\u043e\u043c\u0435\u0440\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u043d\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u043e\u043c\u0435\u0440 \u0432 \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 (\u0434\u043b\u044f \u0420\u043e\u0441\u0441\u0438\u0438 \u044d\u0442\u043e 7\u2026). \u0422\u0430\u043a \u0436\u0435 \u0432 \u0441\u0442\u043e\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u2013 <i>&amp;attempts={\u0447\u0438\u0441\u043b\u043e}<\/i> \u2013 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0434\u043d\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438, \u0442\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u0432\u0435\u0440\u043d\u0443\u043b \u043e\u0448\u0438\u0431\u043a\u0443, \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0442\u0443\u0442 \u0436\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437?<\/p>\n<p>  <b>\u0412\u043e\u0442, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c smsc.php<\/b><\/p>\n<pre><code class=\"php\">&lt;?php  require_once __DIR__.'\/functions\/config.php';  XSS_secure();  if (!Users_Auth::do($PDO)) http_response::return(401, [&quot;description&quot; =&gt; &quot;User not found or login \/ password is incorrect&quot;]);  $sms_handle = new SMS_data_handle($PDO); $sms_handle-&gt;save();   function XSS_secure() {       function replace($arr) {         $filter = array(&quot;&lt;&quot;, &quot;&gt;&quot;);         $filter_replace = array(&quot;&lt;&quot;, &quot;&gt;&quot;);           for ($i=0; $i &lt; count($filter) ; $i++) {             $str = str_replace($filter[$i], $filter_replace[$i], $arr);         }     return $str;     }       if ($_GET) $_GET = replace($_GET);     if ($_POST) $_POST = replace($_POST);   }  ?&gt; <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u2013 <b><i>config.php<\/i><\/b>:<\/p>\n<pre><code class=\"php\">require_once __DIR__.'\/functions\/config.php';<\/code><\/pre>\n<p>  \u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<pre><code class=\"php\">&lt;?php   \/\/ ini_set('error_reporting', E_ALL); \/\/ ini_set('display_errors', 1); \/\/ ini_set('display_startup_errors', 1);   spl_autoload_register(function ($class_name) {     require_once &quot;classes\/{$class_name}.class.php&quot;; });   $PDO_param = [ 'db_host' =&gt; '__', \/\/ database hostname or ip 'db_name' =&gt; '__', \/\/ database name 'db_user' =&gt; '__', \/\/ database username 'db_pass' =&gt; '__', \/\/ databse user password 'db_charset' =&gt; 'utf8', 'pdo_opt' =&gt; [         PDO::ATTR_ERRMODE =&gt; PDO::ERRMODE_EXCEPTION,         PDO::ATTR_DEFAULT_FETCH_MODE =&gt; PDO::FETCH_LAZY,         PDO::ATTR_EMULATE_PREPARES =&gt; false,         ] ];   $PDO = new MYSQL_PDO($PDO_param);   ?&gt; <\/code><\/pre>\n<p>  \u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 XSS, \u0430 \u0434\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e, \u0432\u044b\u0437\u044b\u0432\u0430\u044f \u043c\u0435\u0442\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u0430 <b><i>Users_Auth::do($PDO)<\/i><\/b>:<\/p>\n<pre><code class=\"php\">class Users_Auth {     static function do($PDO)     {       if (!@$_REQUEST['login'] || !@$_REQUEST['pass']) http_response::return(403, ['description' =&gt; 'Check your login and password']);       \/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e       $user = $PDO-&gt;query(&quot;SELECT id, status FROM users WHERE login= ? AND password= ?&quot;, [$_REQUEST['login'], md5(trim($_REQUEST['pass']))]);       if ($user-&gt;rowCount() == 0)           return 0;           \/\/ http_response::return(401, [&quot;description&quot; =&gt; &quot;User not found. Login and password is incorrect&quot;]);        $row = $user-&gt;fetch();       if ($row-&gt;status != 'active')           return 0;           \/\/ http_response::return(401, [&quot;description&quot; =&gt; &quot;User status: {$row-&gt;status}&quot;]);        return 1;     } } <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 false \u2013 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435 \u0443\u0434\u0430\u043b\u0430\u0441\u044c, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043a\u043e\u0434 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 json, \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u0430\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <b><i>$sms_handle-&gt;save()<\/i><\/b>, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u043b\u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u2013 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0438 \u0442\u0435\u043a\u0441\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432 \u0411\u0414 \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c \u0432\u0438\u0434, \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0438 &quot;+&quot; \u0438\u0437 \u043d\u043e\u043c\u0435\u0440\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c \u0438\u0445 \u043f\u043e \u0437\u0430\u043f\u044f\u0442\u043e\u0439. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432 \u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u043d\u0438\u0445 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c. \u0414\u0435\u043b\u0430\u0435\u043c \u0438\u0437 \u044d\u0442\u043e\u0433\u043e json \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0430. \u0415\u0441\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u043e\u043c\u0435\u0440\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 Gammu, \u0438 \u0448\u043b\u044e\u0437 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u044f\u0442 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434. \u041a\u043e\u0433\u0434\u0430 \u0448\u043b\u044e\u0437 \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u0447\u0442\u043e \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0443\u044e \u00ab\u043f\u0440\u043e\u0431\u043a\u0443\u00bb \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u0443\u0439\u0442\u0438.<\/p>\n<pre><code class=\"php\">public function save() {  if (empty($_REQUEST['tel'])) http_response::return(400, [&quot;success&quot; =&gt; false, &quot;description&quot; =&gt; &quot;Phone number is empty&quot;]); if (empty($_REQUEST['msg'])) http_response::return(400, [&quot;success&quot; =&gt; false, &quot;description&quot; =&gt; &quot;Message is empty&quot;]); $msg = $_REQUEST['msg']; $search = array(' ', '+'); $replace = array('', ''); $phone_array = explode(&quot;,&quot;, str_replace($search, $replace, $_REQUEST['tel']));  $query = $this-&gt;PDO-&gt;query(&quot;SELECT uuid FROM users WHERE login = ?&quot;, [$_REQUEST['login']]); $user_uuid = $query-&gt;fetch();  $data = [     'message' =&gt; $msg,     'flash' =&gt; @$_REQUEST['flash'],     'replacemessages_id' =&gt; @$_REQUEST['replacemessages_id'],     'attempts' =&gt; @$_REQUEST['attempts'] ]; $data['attempts'] = (@$_REQUEST['attempts']) ?: 1;  foreach ($phone_array as $phone) {     $data['phone'] = $phone;     $this-&gt;PDO-&gt;query(&quot;INSERT INTO sms_queue SET uuid= ?, data= ?, phone= ?&quot;, [$user_uuid-&gt;uuid, json_encode($data, JSON_UNESCAPED_UNICODE), $phone]); }  http_response::return(200, [&quot;success&quot; =&gt; true, &quot;description&quot; =&gt; &quot;Saved to queue&quot;]);    } <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0432 cron \u0438 \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437 \u0432 5-10 \u0441\u0435\u043a\u0443\u043d\u0434 (\u043f\u043e \u0432\u043a\u0443\u0441\u0443) \u2013 <b><i>send_queue.php<\/i><\/b><\/p>\n<pre><code class=\"php\">&lt;?php   require_once __DIR__.'\/config.php';   $sms_handle = new SMS_data_handle($PDO); $sms_handle-&gt;send();   \/* add follow lines to cron \u2013 crontab -e don't forget to replace &lt;full_path_to&gt; to your really path  * * * * * ( php \/&lt;full_path_to&gt;\/send_queue.php ) * * * * * ( sleep 10 ; php \/&lt;full_path_to&gt;\/send_queue.php ) * * * * * ( sleep 20 ; php \/&lt;full_path_to&gt;\/send_queue.php ) * * * * * ( sleep 30 ; php \/&lt;full_path_to&gt;\/send_queue.php ) * * * * * ( sleep 40 ; php \/&lt;full_path_to&gt;\/send_queue.php ) * * * * * ( sleep 50 ; php \/&lt;full_path_to&gt;\/send_queue.php ) *\/  ?&gt; <\/code><\/pre>\n<p>  \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043c\u0435\u0442\u043e\u0434\u0443 \u043a\u043b\u0430\u0441\u0441\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 <b><i>SMS_data_handle-&gt;send()<\/i><\/b>. \u0417\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435.<br \/>  \u041c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 10 \u043c\u0438\u043d\u0443\u0442 \u0431\u0435\u0437 \u0442\u0435\u0433\u043e\u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0430. \u0415\u0441\u043b\u0438 \u043d\u0430\u0448\u043b\u0438 \u0442\u0430\u043a\u043e\u0435, \u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u0442\u0435\u0433 \u2014 process \u0438 \u0431\u0435\u0440\u0451\u043c \u0432 \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<p>  \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u0438\u0437 \u0442\u0435\u043b\u0430 json uuid \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0448\u043b\u044e\u0437\u043e\u0432. \u0418\u0434\u0435\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441\u043e \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u043e\u043c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d \u043b\u0438 \u043b\u0438\u043c\u0438\u0442 \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443. \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0448\u043b\u044e\u0437 \u0438 \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0435\u043d, \u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u0442\u0435\u0433 \u2014 lock, \u0447\u0442\u043e\u0431\u044b \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0436\u0435 \u043d\u0435 \u0441\u043c\u043e\u0433 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u043a \u043d\u0435\u043c\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f. \u0412\u0441\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 <i>send()<\/i>, \u043d\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0441\u043a\u0438\u0434\u0430\u043d\u0430 \u043f\u043e \u0434\u0440\u0443\u0433\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u043a\u043b\u0430\u0441\u0441\u0430. \u041f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0432\u044b\u0448\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u0435\u0442\u043e\u0434\u0430 \u044d\u0442\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043b\u0435\u0433\u043a\u043e \u0432\u0438\u0434\u043d\u044b.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u043a\u043b\u0430\u0441\u0441\u0430 <b><i>$send_proc = new Gammu_SMS($param)<\/i><\/b> \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043c\u0435\u0442\u043e\u0434\u0443 <b><i>$send_proc-&gt;send($attr)<\/i><\/b> \u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438<\/p>\n<p>  \u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u043c\u0435\u0442\u043e\u0434\u0430 <i>send()<\/i>:<\/p>\n<pre><code class=\"php\">public function send($\u0441 = 1) {       $sended_sms = 0;     for ($i = 0; $i &lt; $\u0441; $i++) {         $sms_queue = $this-&gt;get_sms_queue(1);       if (!$sms_queue-&gt;rowCount()) http_response::return(200, [&quot;description&quot; =&gt; &quot;Nothing to do. Sent. count: {$sended_sms}&quot;]);         $sms_count = $sms_queue-&gt;rowCount();       $msg_row = $sms_queue-&gt;fetch();         $this-&gt;PDO-&gt;query(&quot;UPDATE sms_queue SET status = ? WHERE id = ?&quot;, [&quot;process&quot;, $msg_row-&gt;id]);         $user_gateway = ($this-&gt;get_gateway($msg_row-&gt;uuid));         if (!$user_gateway) {       $this-&gt;PDO-&gt;query(&quot;UPDATE sms_queue SET status = NULL WHERE id= ?&quot;, [$msg_row-&gt;id]);       http_response::return(403, [&quot;description&quot; =&gt; &quot;Not active gateways or get limit of message count&quot;]);       }         $this-&gt;gateway_lock($user_gateway-&gt;id);         $param = [       'host' =&gt; $user_gateway-&gt;host,       'port' =&gt; $user_gateway-&gt;port,       'login' =&gt; 'root',       'password' =&gt; $user_gateway-&gt;password,       ];         $sms_data = json_decode($msg_row-&gt;data);       $sms_data-&gt;message = $sms_data-&gt;message;         $attr = [       'phone' =&gt; $sms_data-&gt;phone,       'message' =&gt; $sms_data-&gt;message,       'attempts' =&gt; $sms_data-&gt;attempts,       'flash' =&gt; $sms_data-&gt;flash,       'replacemessages_id' =&gt; $sms_data-&gt;replacemessages_id,       'gateway' =&gt; $user_gateway-&gt;id,       ];       \/\/ sleep(5);       $send_proc = new Gammu_SMS($param);        if ($send_proc-&gt;send($attr)) {       $this-&gt;sms_2archive($msg_row-&gt;id, $user_gateway-&gt;id);       $this-&gt;update_gwcount($user_gateway-&gt;gw_phone);       $sended_sms++;         } else {       $this-&gt;PDO-&gt;query(&quot;UPDATE sms_queue SET status = NULL WHERE id= ?&quot;, [$msg_row-&gt;id]);       }       $this-&gt;gateway_release($user_gateway-&gt;id);       }       http_response::return(200, [&quot;success&quot; =&gt; true, &quot;description&quot; =&gt; &quot;Message sent. Count: {$sended_sms}&quot;]);     } <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432\u0435\u0440\u043d\u0443\u043b true, \u0442\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u0430\u0440\u0445\u0438\u0432 \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u0447\u0451\u0442\u0447\u0438\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. \u0418\u043d\u0430\u0447\u0435 \u0441\u043d\u0438\u043c\u0430\u0435\u043c \u0442\u0435\u0433 proccess \u0438 \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u0430\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u043e cron.<\/p>\n<p>  \u041e\u0441\u043e\u0431\u043e \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u0440\u0430\u0432\u043d\u044b\u043c \u043e\u0434\u043d\u043e\u043c\u0443 \u2013 <b><i>send($\u0441 = 1)<\/i><\/b>. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <b><i>$c<\/i><\/b> \u0437\u0430\u043b\u043e\u0436\u0435\u043d \u00ab\u043d\u0430 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u0443\u00bb \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u0430\u0447\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0432 \u0446\u0438\u043a\u043b\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u0444\u0430\u0439\u043b\u0435, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u043c \u0432 cron \u043d\u0443\u0436\u043d\u043e \u0432 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0438\u0445 \u0411\u0414 \u2013 <b><i>$sms_handle-&gt;send({\u0447\u0438\u0441\u043b\u043e})<\/i><\/b>;<\/p>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0435\u0449\u0435 \u043d\u0430 \u043e\u0434\u0438\u043d \u043c\u043e\u043c\u0435\u043d\u0442. \u0412 \u0444\u0430\u0439\u043b\u0435 <b><i>smsc.php<\/i><\/b> \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u0411\u0414. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n<blockquote>\n<pre><code class=\"php\">\/\/ $sms_handle-&gt;send();<\/code><\/pre>\n<\/blockquote>\n<p>  \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 cron, \u043d\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u043d\u044e\u0430\u043d\u0441 \u2013 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434, \u0435\u0441\u043b\u0438 \u0432\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043e\u0434\u0438\u043d \u043d\u043e\u043c\u0435\u0440 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0448\u043b\u044e\u0437\u0443 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0447\u0430\u0449\u0435 \u0447\u0435\u043c \u0440\u0430\u0437 \u0432 30 \u0441\u0435\u043a\u0443\u043d\u0434. \u0418\u043d\u0430\u0447\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0435\u0441\u043b\u0438 \u0448\u043b\u044e\u0437 \u0437\u0430\u043d\u044f\u0442, \u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f.<\/p>\n<p>  <b>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 \u0448\u043b\u044e\u0437 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 API \u0438 \u0443\u043c\u0435\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/b><\/p>\n<p>  \u041d\u0443 \u0438 \u0431\u043e\u043d\u0443\u0441\u043e\u043c \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0441 \u0441\u0430\u0439\u0442\u0430. \u0415\u0435 \u043a\u043e\u0434 \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0438, \u043e\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0442 \u0432\u0430\u0441 \u0442\u0435\u0441\u0442 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 POST-\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0432 \u0431\u043b\u043e\u043a\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 ajax \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c url: &quot;\/&lt;*.php&gt;&quot; \u043d\u0430 \u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 smsc.php<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_3\/yn\/-b\/_3yn-bgci94hyduiy_3uu9c0kdk.png\">\u0418\u0442\u0430\u043a \u043f\u043e\u0434\u0432\u0435\u0434\u0435\u043c \u0438\u0442\u043e\u0433\u0438 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443, \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c API \u0434\u043b\u044f \u043b\u0435\u0433\u043a\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0448\u043b\u044e\u0437\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0445 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c GET\/POST-\u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0425\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043c\u0435\u0436\u0434\u0443 \u043a\u0430\u0440\u0442\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0447\u0435\u0435. \u0412\u0441\u0435 \u044d\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0448\u043b\u044e\u0437\u043e\u043c \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0435.   <\/p>\n<blockquote><p><i>\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u044f \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u044e \u043d\u0430 \u0432\u0435\u043b\u0438\u043a\u043e\u043b\u0435\u043f\u043d\u0443\u044e \u043a\u0440\u0430\u0441\u043e\u0442\u0443 \u043a\u043e\u0434\u0430 \u0438 \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u043b\u044e\u0431\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043a\u0440\u0438\u0442\u0438\u043a\u0435 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a (\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043b\u0438\u0447\u0438\u044f) \u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0432\u044b\u043a\u043e\u0432.<\/i><\/p><\/blockquote>\n<p>\u0420\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 <a href=\"https:\/\/github.com\/dagababaev\/smsgateway_API_via_Gammu\">Github<\/a><\/p>\n<p>  <a href=\"http:\/\/ruvds.com\/ru-rub?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=dagababaev&amp;utm_content=svoj_lichnyj_sms_shlyuz_chast_2__sozdayom_api_i_formu_otpravki\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ou\/g5\/kh\/oug5kh6sjydt9llengsiebnp40w.png\"><\/a><\/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=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/555422\/\"> https:\/\/habr.com\/ru\/company\/ruvds\/blog\/555422\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/555422\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ux\/f9\/yf\/uxf9yfujrexmwue03tahisnka3s.jpeg\"><\/div>\n<p><\/a><br \/>  \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u043c \u0432\u0442\u043e\u0440\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0441\u0432\u043e\u0435\u0433\u043e \u0448\u043b\u044e\u0437\u0430.<br \/>  \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 Gammu, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043e\u0441\u043e\u0431\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 SMS \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u0421\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e\u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u2013 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u043a\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0443\u044e \u043f\u0440\u043e\u0441\u043b\u043e\u0439\u043a\u0443 (API), \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e \u0448\u043b\u044e\u0437\u043e\u043c \u043f\u0443\u0442\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u044d\u0442\u043e\u0442 API. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u044d\u0442\u043e \u043a\u043e\u043c\u0444\u043e\u0440\u0442, \u0432\u043e \u0432\u0442\u043e\u0440\u0443\u044e \u2013 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e, \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u0439:<br \/>  <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/554868\/\">\u0421\u0432\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 SMS-\u0448\u043b\u044e\u0437. \u0427\u0430\u0441\u0442\u044c 1 \u2013 \u0446\u0435\u043b\u0438, \u0437\u0430\u0434\u0430\u0447\u0438, \u0441\u0431\u043e\u0440\u043a\u0430 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/a>  <\/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-322497","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/322497","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=322497"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/322497\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=322497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=322497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=322497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}