title: How to send slash message in Discord using Php
body: <p>I am working on &quot;Discord&quot; with Php,Right now if i manually type &quot;/imagine prompt ANYTEXT&quot; then i am getting &quot;image&quot; as response which is correct way,but whenever i trying to send message with php (not manually ) then i am not getting &quot;image&quot;, Here is my current code</p>
  <pre><code>[$url = &quot;https://discord.com/api/webhooks/MYWEBHOOOK&quot;;
  $headers = \[ 'Content-Type: application/json; charset=utf-8' \];
  $POST = \[ 'username' =&gt; 'Testing BOT', 'content' =&gt; '/imagine/prompt/Test'\];
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($POST));
  $response   = curl_exec($ch);][1]
  </code></pre>