{"id":293,"date":"2025-03-22T07:53:52","date_gmt":"2025-03-22T04:23:52","guid":{"rendered":"https:\/\/rabete-mosbat.ir\/?p=293"},"modified":"2025-03-28T19:27:52","modified_gmt":"2025-03-28T15:57:52","slug":"%d8%b1%d8%a8%d8%a7%d8%aa-%d8%a7%db%8c%d9%86%d8%b3%d8%aa%d8%a7%da%af%d8%b1%d8%a7%d9%85%db%8c","status":"publish","type":"post","link":"https:\/\/notes.yummybrands.studio\/?p=293","title":{"rendered":"\u0631\u0628\u0627\u062a \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645\u06cc"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"850\" height=\"478\" src=\"https:\/\/rabete-mosbat.ir\/wp-content\/uploads\/2025\/03\/1-28-e1668664591978.jpg\" alt=\"\" class=\"wp-image-259\" srcset=\"https:\/\/notes.yummybrands.studio\/wp-content\/uploads\/2025\/03\/1-28-e1668664591978.jpg 850w, https:\/\/notes.yummybrands.studio\/wp-content\/uploads\/2025\/03\/1-28-e1668664591978-300x169.jpg 300w, https:\/\/notes.yummybrands.studio\/wp-content\/uploads\/2025\/03\/1-28-e1668664591978-768x432.jpg 768w\" sizes=\"(max-width: 850px) 100vw, 850px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u06a9\u062f\u0646\u0648\u06cc\u0633\u06cc \u0631\u0628\u0627\u062a \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645\u06cc \u062a\u0639\u0627\u0645\u0644 \u0628\u0627 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0627\u06af\u0631 \u0628\u062e\u0648\u0627\u06cc \u0627\u0632 \u0637\u0631\u06cc\u0642 <strong>\u0631\u0628\u0627\u062a \u062a\u0644\u06af\u0631\u0627\u0645 PHP<\/strong> \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0648 \u0627\u0646\u062c\u0627\u0645 \u0628\u062f\u06cc\u060c \u0628\u0627\u06cc\u062f \u0628\u0647 \u0627\u06cc\u0646 \u0635\u0648\u0631\u062a \u0639\u0645\u0644 \u06a9\u0646\u06cc:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u0645\u0631\u0627\u062d\u0644 \u06a9\u0644\u06cc:<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0627\u0645\u0646\u062a\u200c\u0647\u0627\u06cc \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645<\/strong> \u2192 \u0627\u0632 API \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645 \u06cc\u0627 \u0631\u0648\u0634\u200c\u0647\u0627\u06cc \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc.<\/li>\n\n\n\n<li><strong>\u0627\u0631\u0633\u0627\u0644 \u067e\u06cc\u0627\u0645 \u0635\u0648\u062a\u06cc \u062f\u0631 \u062a\u0644\u06af\u0631\u0627\u0645<\/strong> \u2192 \u0648\u0642\u062a\u06cc \u0639\u062f\u062f \u0645\u0648\u0631\u062f\u0646\u0638\u0631 \u062a\u0634\u062e\u06cc\u0635 \u062f\u0627\u062f\u0647 \u0634\u062f\u060c \u06cc\u06a9 \u0648\u06cc\u0633 \u0628\u0631\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631 \u0628\u0641\u0631\u0633\u062a\u06cc.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u06f2. \u0627\u0631\u0633\u0627\u0644 \u067e\u06cc\u0627\u0645 \u0635\u0648\u062a\u06cc \u062f\u0631 \u062a\u0644\u06af\u0631\u0627\u0645 \u0628\u0627 PHP<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u062d\u0627\u0644\u0627 \u0641\u0631\u0636 \u06a9\u0646\u06cc\u0645 \u06a9\u0647 <strong>\u06a9\u0627\u0645\u0646\u062a \u0631\u0648 \u06af\u0631\u0641\u062a\u06cc\u0645<\/strong> \u0648 \u0642\u0631\u0627\u0631\u0647 \u06cc\u0647 \u0648\u06cc\u0633 \u0628\u0647 \u062a\u0644\u06af\u0631\u0627\u0645 \u0628\u0641\u0631\u0633\u062a\u06cc\u0645.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u06a9\u062f \u0627\u0631\u0633\u0627\u0644 \u0648\u06cc\u0633 \u062f\u0631 \u062a\u0644\u06af\u0631\u0627\u0645 \u0628\u0627 PHP<\/strong><\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#ffffff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"&lt;?php\n$botToken = &quot;YOUR_BOT_TOKEN&quot;; \/\/ \u062a\u0648\u06a9\u0646 \u0631\u0628\u0627\u062a \u062a\u0644\u06af\u0631\u0627\u0645\n$chatId = &quot;USER_CHAT_ID&quot;; \/\/ \u0622\u06cc\u062f\u06cc \u0686\u062a \u06a9\u0627\u0631\u0628\u0631\n\n\/\/ \u0645\u0633\u06cc\u0631 \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc \u0631\u0648\u06cc \u0633\u0631\u0648\u0631\n$voiceFile = new CURLFile(&quot;voice.ogg&quot;);\n\n\/\/ \u0627\u0631\u0633\u0627\u0644 \u067e\u06cc\u0627\u0645 \u0635\u0648\u062a\u06cc\n$url = &quot;https:\/\/api.telegram.org\/bot$botToken\/sendVoice&quot;;\n$data = [\n    &quot;chat_id&quot; =&gt; $chatId,\n    &quot;voice&quot; =&gt; $voiceFile,\n    &quot;caption&quot; =&gt; &quot;\u0627\u06cc\u0646 \u067e\u06cc\u0627\u0645 \u0635\u0648\u062a\u06cc \u0628\u0631\u0627\u06cc \u0634\u0645\u0627 \u0627\u0631\u0633\u0627\u0644 \u0634\u062f!&quot;\n];\n\n$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, $url);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\ncurl_setopt($ch, CURLOPT_POST, 1);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n$result = curl_exec($ch);\ncurl_close($ch);\n\necho $result;\n?&gt;\n\" style=\"color:#24292eff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki min-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D32F2F\">&lt;?<\/span><span style=\"color: #24292EFF\">php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">$botToken <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #22863A\">&quot;YOUR_BOT_TOKEN&quot;<\/span><span style=\"color: #24292EFF\">; <\/span><span style=\"color: #C2C3C5\">\/\/ \u062a\u0648\u06a9\u0646 \u0631\u0628\u0627\u062a \u062a\u0644\u06af\u0631\u0627\u0645<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">$chatId <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #22863A\">&quot;USER_CHAT_ID&quot;<\/span><span style=\"color: #24292EFF\">; <\/span><span style=\"color: #C2C3C5\">\/\/ \u0622\u06cc\u062f\u06cc \u0686\u062a \u06a9\u0627\u0631\u0628\u0631<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #C2C3C5\">\/\/ \u0645\u0633\u06cc\u0631 \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc \u0631\u0648\u06cc \u0633\u0631\u0648\u0631<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">$voiceFile <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #D32F2F\">new<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #1976D2\">CURLFile<\/span><span style=\"color: #24292EFF\">(<\/span><span style=\"color: #22863A\">&quot;voice.ogg&quot;<\/span><span style=\"color: #24292EFF\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #C2C3C5\">\/\/ \u0627\u0631\u0633\u0627\u0644 \u067e\u06cc\u0627\u0645 \u0635\u0648\u062a\u06cc<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">$url <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #22863A\">&quot;https:\/\/api.telegram.org\/bot$botToken\/sendVoice&quot;<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">$data <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">    <\/span><span style=\"color: #22863A\">&quot;chat_id&quot;<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #D32F2F\">=&gt;<\/span><span style=\"color: #24292EFF\"> $chatId<\/span><span style=\"color: #212121\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">    <\/span><span style=\"color: #22863A\">&quot;voice&quot;<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #D32F2F\">=&gt;<\/span><span style=\"color: #24292EFF\"> $voiceFile<\/span><span style=\"color: #212121\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">    <\/span><span style=\"color: #22863A\">&quot;caption&quot;<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #D32F2F\">=&gt;<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #22863A\">&quot;\u0627\u06cc\u0646 \u067e\u06cc\u0627\u0645 \u0635\u0648\u062a\u06cc \u0628\u0631\u0627\u06cc \u0634\u0645\u0627 \u0627\u0631\u0633\u0627\u0644 \u0634\u062f!&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">];<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">$ch <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #6F42C1\">curl_init<\/span><span style=\"color: #212121\">()<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6F42C1\">curl_setopt<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #6F42C1\">$ch<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> CURLOPT_URL<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> $url<\/span><span style=\"color: #212121\">)<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6F42C1\">curl_setopt<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #6F42C1\">$ch<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> CURLOPT_RETURNTRANSFER<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> <\/span><span style=\"color: #1976D2\">1<\/span><span style=\"color: #212121\">)<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6F42C1\">curl_setopt<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #6F42C1\">$ch<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> CURLOPT_POST<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> <\/span><span style=\"color: #1976D2\">1<\/span><span style=\"color: #212121\">)<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6F42C1\">curl_setopt<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #6F42C1\">$ch<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> CURLOPT_POSTFIELDS<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> $data<\/span><span style=\"color: #212121\">)<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">$result <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #6F42C1\">curl_exec<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #6F42C1\">$ch<\/span><span style=\"color: #212121\">)<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6F42C1\">curl_close<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #6F42C1\">$ch<\/span><span style=\"color: #212121\">)<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #6F42C1\">echo<\/span><span style=\"color: #24292EFF\"> $result;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D32F2F\">?&gt;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u0646\u06a9\u0627\u062a \u0645\u0647\u0645 \u062f\u0631 \u0627\u06cc\u0646 \u06a9\u062f:<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0628\u0627\u06cc\u062f <strong>\u06cc\u06a9 \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc \u0628\u0627 \u0641\u0631\u0645\u062a OGG<\/strong> \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc \u06a9\u0647 \u0631\u0628\u0627\u062a \u0628\u062a\u0648\u0646\u0647 \u0627\u0631\u0633\u0627\u0644 \u06a9\u0646\u0647.<\/li>\n\n\n\n<li>\u0627\u06af\u0647 \u0645\u06cc\u200c\u062e\u0648\u0627\u06cc \u0641\u0627\u06cc\u0644 \u0635\u0648\u062a\u06cc <strong>\u062f\u0627\u06cc\u0646\u0627\u0645\u06cc\u06a9 \u0628\u0627\u0634\u0647<\/strong>\u060c \u0645\u06cc\u200c\u062a\u0648\u0646\u06cc \u0628\u0627 <code>ffmpeg<\/code> \u06cc\u0627 \u0647\u0631 \u0633\u0631\u0648\u06cc\u0633 TTS (\u062a\u0628\u062f\u06cc\u0644 \u0645\u062a\u0646 \u0628\u0647 \u0635\u062f\u0627) \u06cc\u06a9 \u0648\u06cc\u0633 \u0628\u0633\u0627\u0632\u06cc \u0648 \u0628\u0639\u062f \u0628\u0641\u0631\u0633\u062a\u06cc.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u06f3. \u0627\u062a\u0635\u0627\u0644 \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645 \u0628\u0647 PHP (\u0631\u0648\u0634 \u067e\u06cc\u0634\u0646\u0647\u0627\u062f\u06cc)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u062d\u0627\u0644\u0627 \u06a9\u0647 \u0627\u0631\u0633\u0627\u0644 \u0648\u06cc\u0633 \u062f\u0631 \u062a\u0644\u06af\u0631\u0627\u0645 \u0631\u0648 \u062d\u0644 \u06a9\u0631\u062f\u06cc\u0645\u060c <strong>\u0686\u0637\u0648\u0631 \u0628\u0641\u0647\u0645\u06cc\u0645 \u06a9\u0647 \u0639\u062f\u062f\u06cc \u062f\u0631 \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645 \u06a9\u0627\u0645\u0646\u062a \u0634\u062f\u0647\u061f<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u0645\u06cc\u200c\u062a\u0648\u0646\u06cc \u06cc\u0647 <strong>\u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u067e\u0627\u06cc\u062a\u0648\u0646<\/strong> \u0628\u0646\u0648\u06cc\u0633\u06cc \u06a9\u0647 \u0647\u0631 \u0686\u0646\u062f \u062f\u0642\u06cc\u0642\u0647 \u06a9\u0627\u0645\u0646\u062a\u200c\u0647\u0627 \u0631\u0648 \u0628\u0631\u0631\u0633\u06cc \u06a9\u0646\u0647.<\/li>\n\n\n\n<li>\u0648\u0642\u062a\u06cc \u06a9\u0627\u0645\u0646\u062a \u062c\u062f\u06cc\u062f \u0634\u0627\u0645\u0644 \u0639\u062f\u062f \u0645\u0648\u0631\u062f\u0646\u0638\u0631 \u067e\u06cc\u062f\u0627 \u0634\u062f\u060c \u0627\u0648\u0646 \u0631\u0648 <strong>\u0628\u0647 \u0633\u0631\u0648\u0631 PHP \u0627\u0631\u0633\u0627\u0644 \u06a9\u0646\u0647<\/strong>.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u062f\u0631\u06cc\u0627\u0641\u062a \u062f\u0627\u062f\u0647 \u062f\u0631 PHP \u0648 \u0627\u0631\u0633\u0627\u0644 \u0648\u06cc\u0633<\/strong><\/h4>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#ffffff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"<?php\nif ($_SERVER[&quot;REQUEST_METHOD&quot;] == &quot;POST&quot;) {\n    $username = $_POST[&quot;username&quot;];\n    $comment = $_POST[&quot;comment&quot;];\n\n    if ($comment == &quot;7&quot;) {\n        $chatId = &quot;@your_channel_or_user&quot;; \/\/ \u0622\u06cc\u062f\u06cc \u062a\u0644\u06af\u0631\u0627\u0645\n        include(&quot;send_voice.php&quot;); \/\/ \u0627\u06cc\u0646 \u0641\u0627\u06cc\u0644 \u0647\u0645\u0648\u0646 \u06a9\u062f \u0627\u0631\u0633\u0627\u0644 \u0648\u06cc\u0633 \u0647\u0633\u062a\n    }\n}\n?&gt;\n\" style=\"color:#24292eff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki min-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D32F2F\">&lt;?<\/span><span style=\"color: #24292EFF\">php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D32F2F\">if<\/span><span style=\"color: #24292EFF\"> ($_SERVER[<\/span><span style=\"color: #22863A\">&quot;REQUEST_METHOD&quot;<\/span><span style=\"color: #24292EFF\">] <\/span><span style=\"color: #D32F2F\">==<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #22863A\">&quot;POST&quot;<\/span><span style=\"color: #24292EFF\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">    $username <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> $_POST[<\/span><span style=\"color: #22863A\">&quot;username&quot;<\/span><span style=\"color: #24292EFF\">];<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">    $comment <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> $_POST[<\/span><span style=\"color: #22863A\">&quot;comment&quot;<\/span><span style=\"color: #24292EFF\">];<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">    <\/span><span style=\"color: #D32F2F\">if<\/span><span style=\"color: #24292EFF\"> ($comment <\/span><span style=\"color: #D32F2F\">==<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #22863A\">&quot;7&quot;<\/span><span style=\"color: #24292EFF\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        $chatId <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #22863A\">&quot;@your_channel_or_user&quot;<\/span><span style=\"color: #24292EFF\">; <\/span><span style=\"color: #C2C3C5\">\/\/ \u0622\u06cc\u062f\u06cc \u062a\u0644\u06af\u0631\u0627\u0645<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        <\/span><span style=\"color: #D32F2F\">include<\/span><span style=\"color: #24292EFF\">(<\/span><span style=\"color: #22863A\">&quot;send_voice.php&quot;<\/span><span style=\"color: #24292EFF\">); <\/span><span style=\"color: #C2C3C5\">\/\/ \u0627\u06cc\u0646 \u0641\u0627\u06cc\u0644 \u0647\u0645\u0648\u0646 \u06a9\u062f \u0627\u0631\u0633\u0627\u0644 \u0648\u06cc\u0633 \u0647\u0633\u062a<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D32F2F\">?&gt;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized feather-image\"><img decoding=\"async\" width=\"632\" height=\"458\" src=\"https:\/\/notes.academy-tara.ir\/wp-content\/uploads\/2025\/03\/logo.svg\" alt=\"\" class=\"wp-image-196\" style=\"width:134px;height:auto\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0633\u0627\u062e\u062a \u0631\u0628\u0627\u062a \u0628\u0627 PHP \u0648 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 <strong>Webhook \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645 + \u062a\u0644\u06af\u0631\u0627\u0645<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2705 <strong>\u0628\u062f\u0648\u0646 \u0646\u06cc\u0627\u0632 \u0628\u0647 \u0627\u0634\u062a\u0631\u0627\u06a9 \u067e\u0648\u0644\u06cc<\/strong><br>\u2705 <strong>\u06a9\u0646\u062a\u0631\u0644 \u06a9\u0627\u0645\u0644 \u0631\u0648\u06cc \u062f\u0627\u062f\u0647\u200c\u0647\u0627<\/strong><br>\u2705 <strong>\u0642\u0627\u0628\u0644 \u0627\u062c\u0631\u0627 \u0631\u0648\u06cc \u0647\u0627\u0633\u062a \u0634\u062e\u0635\u06cc<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u06f1. \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0627\u0645\u0646\u062a\u200c\u0647\u0627\u06cc \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645 (API \u0631\u0627\u06cc\u06af\u0627\u0646)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0645\u062a\u0627 \u06cc\u06a9 <strong>Webhook API \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645<\/strong> \u062f\u0627\u0631\u0647 \u06a9\u0647 \u0648\u0642\u062a\u06cc \u06a9\u0633\u06cc \u06a9\u0627\u0645\u0646\u062a\u06cc \u06af\u0630\u0627\u0634\u062a\u060c \u06cc\u0647 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0628\u0647 \u0633\u0631\u0648\u0631 \u0634\u0645\u0627 \u0645\u06cc\u200c\u0641\u0631\u0633\u062a\u0647. \u0627\u06cc\u0646 \u0631\u0648\u0634 <strong>\u06a9\u0627\u0645\u0644\u0627\u064b \u0631\u0627\u06cc\u06af\u0627\u0646<\/strong> \u0648 \u0631\u0633\u0645\u06cc \u0647\u0633\u062a.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u0645\u0631\u0627\u062d\u0644 \u0641\u0639\u0627\u0644\u200c\u0633\u0627\u0632\u06cc Webhook \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645:<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u06f1. \u0628\u0647 <a href=\"https:\/\/developers.facebook.com\/\">Meta Developers<\/a> \u0628\u0631\u0648 \u0648 \u06cc\u0647 <strong>App \u062c\u062f\u06cc\u062f<\/strong> \u0628\u0633\u0627\u0632.<br>\u06f2. \u0642\u0633\u0645\u062a <strong>Instagram Graph API<\/strong> \u0631\u0648 \u0641\u0639\u0627\u0644 \u06a9\u0646.<br>3. \u062f\u0631 \u0642\u0633\u0645\u062a <strong>Webhooks<\/strong>\u060c \u06cc\u06a9 \u0622\u062f\u0631\u0633 \u0628\u0647 \u0633\u0631\u0648\u0631 PHP \u062e\u0648\u062f\u062a \u0628\u062f\u0647.<br>4. \u062a\u0646\u0638\u06cc\u0645 \u06a9\u0646 \u06a9\u0647 \u0648\u0642\u062a\u06cc \u06a9\u0627\u0645\u0646\u062a\u06cc \u062b\u0628\u062a \u0634\u062f\u060c \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0631\u0648 \u0628\u0647 \u0627\u0648\u0646 \u0622\u062f\u0631\u0633 \u0628\u0641\u0631\u0633\u062a\u0647.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u06f2. \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0627\u0645\u0646\u062a \u062f\u0631 PHP<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u062d\u0627\u0644\u0627 \u06a9\u0647 \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645 \u0627\u0637\u0644\u0627\u0639\u0627\u062a \u0631\u0648 \u0628\u0647 \u0633\u0631\u0648\u0631\u062a \u0645\u06cc\u200c\u0641\u0631\u0633\u062a\u0647\u060c \u06cc\u0647 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0645\u06cc\u200c\u0646\u0648\u06cc\u0633\u06cc\u0645 \u06a9\u0647 \u0627\u06cc\u0646 \u062f\u0627\u062f\u0647\u200c\u0647\u0627 \u0631\u0648 \u067e\u0631\u062f\u0627\u0632\u0634 \u06a9\u0646\u0647:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#ffffff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"<?php\n\/\/ \u062f\u0631\u06cc\u0627\u0641\u062a \u062f\u0627\u062f\u0647\u200c\u0647\u0627 \u0627\u0632 \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645\n$update = json_decode(file_get_contents(&quot;php:\/\/input&quot;), true);\n\n\/\/ \u0686\u06a9 \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0627\u06cc\u0646 \u06cc\u06a9 \u06a9\u0627\u0645\u0646\u062a \u062c\u062f\u06cc\u062f \u0647\u0633\u062a\nif (isset($update['entry'][0]['changes'][0]['value']['text'])) {\n    $commentText = $update['entry'][0]['changes'][0]['value']['text'];\n    $username = $update['entry'][0]['changes'][0]['value']['from']['username'];\n\n    \/\/ \u0627\u06af\u0631 \u0639\u062f\u062f \u062e\u0627\u0635\u06cc (\u0645\u062b\u0644\u0627\u064b &quot;7&quot;) \u06a9\u0627\u0645\u0646\u062a \u0634\u062f\u0647 \u0628\u0648\u062f\n    if ($commentText == &quot;7&quot;) {\n        file_get_contents(&quot;https:\/\/api.telegram.org\/botYOUR_BOT_TOKEN\/sendMessage?chat_id=@YOUR_CHANNEL&amp;text=\u06a9\u0627\u0631\u0628\u0631 @$username \u0639\u062f\u062f \u06f7 \u0631\u0627 \u06a9\u0627\u0645\u0646\u062a \u06a9\u0631\u062f!&quot;);\n        \n        \/\/ \u0627\u0631\u0633\u0627\u0644 \u0648\u06cc\u0633\n        $voiceFile = new CURLFile(&quot;voice.ogg&quot;);\n        $telegramApiUrl = &quot;https:\/\/api.telegram.org\/botYOUR_BOT_TOKEN\/sendVoice&quot;;\n        $data = [\n            &quot;chat_id&quot; =&gt; &quot;@YOUR_CHANNEL&quot;,\n            &quot;voice&quot; =&gt; $voiceFile,\n            &quot;caption&quot; =&gt; &quot;\u0627\u06cc\u0646 \u0648\u06cc\u0633 \u0645\u062e\u0635\u0648\u0635 \u0634\u0645\u0627\u0633\u062a!&quot;\n        ];\n\n        $ch = curl_init();\n        curl_setopt($ch, CURLOPT_URL, $telegramApiUrl);\n        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n        curl_setopt($ch, CURLOPT_POST, 1);\n        curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n        curl_exec($ch);\n        curl_close($ch);\n    }\n}\n?&gt;\" style=\"color:#24292eff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki min-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D32F2F\">&lt;?<\/span><span style=\"color: #24292EFF\">php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #C2C3C5\">\/\/ \u062f\u0631\u06cc\u0627\u0641\u062a \u062f\u0627\u062f\u0647\u200c\u0647\u0627 \u0627\u0632 \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">$update <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #6F42C1\">json_decode<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #6F42C1\">file_get_contents<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #22863A\">&quot;php:\/\/input&quot;<\/span><span style=\"color: #212121\">),<\/span><span style=\"color: #6F42C1\"> <\/span><span style=\"color: #1976D2\">true<\/span><span style=\"color: #212121\">)<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #C2C3C5\">\/\/ \u0686\u06a9 \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u0627\u06cc\u0646 \u06cc\u06a9 \u06a9\u0627\u0645\u0646\u062a \u062c\u062f\u06cc\u062f \u0647\u0633\u062a<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D32F2F\">if<\/span><span style=\"color: #24292EFF\"> (<\/span><span style=\"color: #6F42C1\">isset<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #6F42C1\">$update[<\/span><span style=\"color: #22863A\">&#39;entry&#39;<\/span><span style=\"color: #6F42C1\">][<\/span><span style=\"color: #1976D2\">0<\/span><span style=\"color: #6F42C1\">][<\/span><span style=\"color: #22863A\">&#39;changes&#39;<\/span><span style=\"color: #6F42C1\">][<\/span><span style=\"color: #1976D2\">0<\/span><span style=\"color: #6F42C1\">][<\/span><span style=\"color: #22863A\">&#39;value&#39;<\/span><span style=\"color: #6F42C1\">][<\/span><span style=\"color: #22863A\">&#39;text&#39;<\/span><span style=\"color: #6F42C1\">]<\/span><span style=\"color: #212121\">)<\/span><span style=\"color: #24292EFF\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">    $commentText <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> $update[<\/span><span style=\"color: #22863A\">&#39;entry&#39;<\/span><span style=\"color: #24292EFF\">][<\/span><span style=\"color: #1976D2\">0<\/span><span style=\"color: #24292EFF\">][<\/span><span style=\"color: #22863A\">&#39;changes&#39;<\/span><span style=\"color: #24292EFF\">][<\/span><span style=\"color: #1976D2\">0<\/span><span style=\"color: #24292EFF\">][<\/span><span style=\"color: #22863A\">&#39;value&#39;<\/span><span style=\"color: #24292EFF\">][<\/span><span style=\"color: #22863A\">&#39;text&#39;<\/span><span style=\"color: #24292EFF\">];<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">    $username <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> $update[<\/span><span style=\"color: #22863A\">&#39;entry&#39;<\/span><span style=\"color: #24292EFF\">][<\/span><span style=\"color: #1976D2\">0<\/span><span style=\"color: #24292EFF\">][<\/span><span style=\"color: #22863A\">&#39;changes&#39;<\/span><span style=\"color: #24292EFF\">][<\/span><span style=\"color: #1976D2\">0<\/span><span style=\"color: #24292EFF\">][<\/span><span style=\"color: #22863A\">&#39;value&#39;<\/span><span style=\"color: #24292EFF\">][<\/span><span style=\"color: #22863A\">&#39;from&#39;<\/span><span style=\"color: #24292EFF\">][<\/span><span style=\"color: #22863A\">&#39;username&#39;<\/span><span style=\"color: #24292EFF\">];<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">    <\/span><span style=\"color: #C2C3C5\">\/\/ \u0627\u06af\u0631 \u0639\u062f\u062f \u062e\u0627\u0635\u06cc (\u0645\u062b\u0644\u0627\u064b &quot;7&quot;) \u06a9\u0627\u0645\u0646\u062a \u0634\u062f\u0647 \u0628\u0648\u062f<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">    <\/span><span style=\"color: #D32F2F\">if<\/span><span style=\"color: #24292EFF\"> ($commentText <\/span><span style=\"color: #D32F2F\">==<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #22863A\">&quot;7&quot;<\/span><span style=\"color: #24292EFF\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        <\/span><span style=\"color: #6F42C1\">file_get_contents<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #22863A\">&quot;https:\/\/api.telegram.org\/botYOUR_BOT_TOKEN\/sendMessage?chat_id=@YOUR_CHANNEL&amp;text=\u06a9\u0627\u0631\u0628\u0631 @$username \u0639\u062f\u062f \u06f7 \u0631\u0627 \u06a9\u0627\u0645\u0646\u062a \u06a9\u0631\u062f!&quot;<\/span><span style=\"color: #212121\">)<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        <\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        <\/span><span style=\"color: #C2C3C5\">\/\/ \u0627\u0631\u0633\u0627\u0644 \u0648\u06cc\u0633<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        $voiceFile <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #D32F2F\">new<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #1976D2\">CURLFile<\/span><span style=\"color: #24292EFF\">(<\/span><span style=\"color: #22863A\">&quot;voice.ogg&quot;<\/span><span style=\"color: #24292EFF\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        $telegramApiUrl <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #22863A\">&quot;https:\/\/api.telegram.org\/botYOUR_BOT_TOKEN\/sendVoice&quot;<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        $data <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">            <\/span><span style=\"color: #22863A\">&quot;chat_id&quot;<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #D32F2F\">=&gt;<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #22863A\">&quot;@YOUR_CHANNEL&quot;<\/span><span style=\"color: #212121\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">            <\/span><span style=\"color: #22863A\">&quot;voice&quot;<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #D32F2F\">=&gt;<\/span><span style=\"color: #24292EFF\"> $voiceFile<\/span><span style=\"color: #212121\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">            <\/span><span style=\"color: #22863A\">&quot;caption&quot;<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #D32F2F\">=&gt;<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #22863A\">&quot;\u0627\u06cc\u0646 \u0648\u06cc\u0633 \u0645\u062e\u0635\u0648\u0635 \u0634\u0645\u0627\u0633\u062a!&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        ];<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        $ch <\/span><span style=\"color: #D32F2F\">=<\/span><span style=\"color: #24292EFF\"> <\/span><span style=\"color: #6F42C1\">curl_init<\/span><span style=\"color: #212121\">()<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        <\/span><span style=\"color: #6F42C1\">curl_setopt<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #6F42C1\">$ch<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> CURLOPT_URL<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> $telegramApiUrl<\/span><span style=\"color: #212121\">)<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        <\/span><span style=\"color: #6F42C1\">curl_setopt<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #6F42C1\">$ch<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> CURLOPT_RETURNTRANSFER<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> <\/span><span style=\"color: #1976D2\">1<\/span><span style=\"color: #212121\">)<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        <\/span><span style=\"color: #6F42C1\">curl_setopt<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #6F42C1\">$ch<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> CURLOPT_POST<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> <\/span><span style=\"color: #1976D2\">1<\/span><span style=\"color: #212121\">)<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        <\/span><span style=\"color: #6F42C1\">curl_setopt<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #6F42C1\">$ch<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> CURLOPT_POSTFIELDS<\/span><span style=\"color: #212121\">,<\/span><span style=\"color: #6F42C1\"> $data<\/span><span style=\"color: #212121\">)<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        <\/span><span style=\"color: #6F42C1\">curl_exec<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #6F42C1\">$ch<\/span><span style=\"color: #212121\">)<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">        <\/span><span style=\"color: #6F42C1\">curl_close<\/span><span style=\"color: #212121\">(<\/span><span style=\"color: #6F42C1\">$ch<\/span><span style=\"color: #212121\">)<\/span><span style=\"color: #24292EFF\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292EFF\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D32F2F\">?&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u06f3. \u062b\u0628\u062a Webhook \u062f\u0631 \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0628\u0639\u062f \u0627\u0632 \u0627\u06cc\u0646\u06a9\u0647 \u0627\u06cc\u0646 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0631\u0648 \u0631\u0648\u06cc \u0633\u0631\u0648\u0631\u062a \u0622\u067e\u0644\u0648\u062f \u06a9\u0631\u062f\u06cc\u060c \u0628\u0627\u06cc\u062f Webhook \u0631\u0648 \u0628\u0647 \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645 \u0645\u0639\u0631\u0641\u06cc \u06a9\u0646\u06cc. \u0628\u0627 \u0627\u062c\u0631\u0627\u06cc \u0627\u06cc\u0646 \u062f\u0633\u062a\u0648\u0631 \u062f\u0631 <strong>Postman<\/strong> \u06cc\u0627 <strong>\u062a\u0631\u0645\u06cc\u0646\u0627\u0644<\/strong> \u0645\u06cc\u200c\u062a\u0648\u0646\u06cc \u062b\u0628\u062a\u0634 \u06a9\u0646\u06cc:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#ffffff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"curl -X POST &quot;https:\/\/graph.facebook.com\/v17.0\/YOUR_APP_ID\/subscriptions&quot; \\\n-H &quot;Content-Type: application\/json&quot; \\\n-H &quot;Authorization: Bearer YOUR_ACCESS_TOKEN&quot; \\\n-d '{\n  &quot;object&quot;: &quot;instagram&quot;,\n  &quot;callback_url&quot;: &quot;https:\/\/yourserver.com\/instagram_webhook.php&quot;,\n  &quot;fields&quot;: [&quot;comments&quot;],\n  &quot;verify_token&quot;: &quot;YOUR_VERIFY_TOKEN&quot;\n}'\" style=\"color:#24292eff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki min-light\" style=\"background-color: #ffffff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #24292EFF\">curl <\/span><span style=\"color: #D32F2F\">-<\/span><span style=\"color: #24292EFF\">X POST <\/span><span style=\"color: #22863A\">&quot;https:\/\/graph.facebook.com\/v17.0\/YOUR_APP_ID\/subscriptions&quot;<\/span><span style=\"color: #24292EFF\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D32F2F\">-<\/span><span style=\"color: #24292EFF\">H <\/span><span style=\"color: #22863A\">&quot;Content-Type: application\/json&quot;<\/span><span style=\"color: #24292EFF\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D32F2F\">-<\/span><span style=\"color: #24292EFF\">H <\/span><span style=\"color: #22863A\">&quot;Authorization: Bearer YOUR_ACCESS_TOKEN&quot;<\/span><span style=\"color: #24292EFF\"> \\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D32F2F\">-<\/span><span style=\"color: #24292EFF\">d <\/span><span style=\"color: #22863A\">&#39;{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #22863A\">  &quot;object&quot;: &quot;instagram&quot;,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #22863A\">  &quot;callback_url&quot;: &quot;https:\/\/yourserver.com\/instagram_webhook.php&quot;,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #22863A\">  &quot;fields&quot;: [&quot;comments&quot;],<\/span><\/span>\n<span class=\"line\"><span style=\"color: #22863A\">  &quot;verify_token&quot;: &quot;YOUR_VERIFY_TOKEN&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #22863A\">}&#39;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u06f4. \u0646\u062a\u06cc\u062c\u0647 \u0646\u0647\u0627\u06cc\u06cc<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83c\udfaf <strong>\u06a9\u0627\u0631\u0628\u0631 \u0639\u062f\u062f &#8220;\u06f7&#8221; \u0631\u0648 \u06a9\u0627\u0645\u0646\u062a \u0645\u06cc\u200c\u06a9\u0646\u0647<\/strong><br>\ud83c\udfaf <strong>\u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645 \u062f\u0627\u062f\u0647\u200c\u0647\u0627 \u0631\u0648 \u0628\u0647 \u0633\u0631\u0648\u0631 PHP \u0645\u06cc\u200c\u0641\u0631\u0633\u062a\u0647<\/strong><br>\ud83c\udfaf <strong>PHP \u062f\u0627\u062f\u0647 \u0631\u0648 \u067e\u0631\u062f\u0627\u0632\u0634 \u0645\u06cc\u200c\u06a9\u0646\u0647 \u0648 \u0648\u06cc\u0633 \u0645\u06cc\u200c\u0641\u0631\u0633\u062a\u0647<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\ud83d\udca1 \u0645\u0632\u0627\u06cc\u0627:<\/strong><br>\u2705 <strong>\u0631\u0627\u06cc\u06af\u0627\u0646<\/strong> \u0648 \u0628\u062f\u0648\u0646 \u0645\u062d\u062f\u0648\u062f\u06cc\u062a<br>\u2705 <strong>\u0646\u06cc\u0627\u0632 \u0628\u0647 \u0627\u0628\u0632\u0627\u0631 \u067e\u0648\u0644\u06cc \u0646\u062f\u0627\u0631\u0647<\/strong><br>\u2705 <strong>\u06a9\u0627\u0645\u0644\u0627\u064b \u0627\u062a\u0648\u0645\u0627\u062a\u06cc\u06a9 \u0648 \u0633\u0631\u06cc\u0639<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u06a9\u062f\u0646\u0648\u06cc\u0633\u06cc \u0631\u0628\u0627\u062a \u0627\u06cc\u0646\u0633\u062a\u0627\u06af\u0631\u0627\u0645\u06cc \u062a\u0639\u0627\u0645\u0644 \u0628\u0627 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0627\u06af\u0631 \u0628\u062e\u0648\u0627\u06cc \u0627\u0632 \u0637\u0631\u06cc\u0642 \u0631\u0628\u0627\u062a \u062a\u0644\u06af\u0631\u0627\u0645 PHP \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0648 \u0627\u0646\u062c\u0627\u0645 \u0628\u062f\u06cc\u060c \u0628\u0627\u06cc\u062f \u0628\u0647 \u0627\u06cc\u0646 \u0635\u0648\u0631\u062a \u0639\u0645\u0644 \u06a9\u0646\u06cc: \u0645\u0631\u0627\u062d\u0644 \u06a9\u0644\u06cc: \u06f2. \u0627\u0631\u0633\u0627\u0644 \u067e\u06cc\u0627\u0645 \u0635\u0648\u062a\u06cc \u062f\u0631 \u062a\u0644\u06af\u0631\u0627\u0645 \u0628\u0627 PHP \u062d\u0627\u0644\u0627 \u0641\u0631\u0636 \u06a9\u0646\u06cc\u0645 \u06a9\u0647 \u06a9\u0627\u0645\u0646\u062a \u0631\u0648 \u06af\u0631\u0641\u062a\u06cc\u0645 \u0648 \u0642\u0631\u0627\u0631\u0647 \u06cc\u0647 \u0648\u06cc\u0633 \u0628\u0647 \u062a\u0644\u06af\u0631\u0627\u0645 \u0628\u0641\u0631\u0633\u062a\u06cc\u0645. \u06a9\u062f \u0627\u0631\u0633\u0627\u0644 \u0648\u06cc\u0633 \u062f\u0631 \u062a\u0644\u06af\u0631\u0627\u0645 \u0628\u0627 PHP [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":259,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[11],"tags":[],"class_list":["post-293","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-11"],"_links":{"self":[{"href":"https:\/\/notes.yummybrands.studio\/index.php?rest_route=\/wp\/v2\/posts\/293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/notes.yummybrands.studio\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notes.yummybrands.studio\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notes.yummybrands.studio\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/notes.yummybrands.studio\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=293"}],"version-history":[{"count":4,"href":"https:\/\/notes.yummybrands.studio\/index.php?rest_route=\/wp\/v2\/posts\/293\/revisions"}],"predecessor-version":[{"id":586,"href":"https:\/\/notes.yummybrands.studio\/index.php?rest_route=\/wp\/v2\/posts\/293\/revisions\/586"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/notes.yummybrands.studio\/index.php?rest_route=\/wp\/v2\/media\/259"}],"wp:attachment":[{"href":"https:\/\/notes.yummybrands.studio\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.yummybrands.studio\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.yummybrands.studio\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}