title: telegram bot send message from server failed (PHP)
body: <p>I need a simple bot to send message via telegram. I use this php code for the reason:</p>
  
  <pre><code>header('Content-Type: text/html; charset=utf-8');
  $message= file_get_contents("php://input");
  $arrayMessage= json_decode($message, true);
  $token= "*********";
  $chat_id= $arrayMessage['message']['from']['id'];
  $command= $arrayMessage['message']['text'];
      if($command == '/start'){
        $text= "Hello";
        $url= "https://api.telegram.org/bot".$token."/sendMessage?chat_id=".$chat_id."&amp;text=".$text;
        file_put_contents("message.txt", $url);
        //file_get_contents ($url);
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url); 
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
        $output = curl_exec($ch);   
        curl_close($ch);
        }
  </code></pre>
  
  <ol>
  <li>When i use file_get_contents i receive http bad request 400 ....</li>
  <li>With curl nothing changed </li>
  <li>I put the $url in text file and i used it in the browser and it works great</li>
  </ol>
  
  <p>any suggestion? </p>
  
  <blockquote>
    <p>i use cloudflare for ssl certificate and the webhook method is initiated.</p>
  </blockquote>