title: Execute AT commands to send sms in php
body: <p>I am trying to execute AT commands from PHP.</p>
  
  <p>I tried exec() and shell_exec()</p>
  
  <p>Please don't suggest third party SMS gateway my client doesn't want to disclose his private information and wants to send SMS from his own server.</p>
  
  <p>I have a GSM modem attach to a serial port which I can access through "putty" like in fig
  <img src="https://i.stack.imgur.com/GJL7l.png" alt="putty screen 1"></p>
  
  <p>And I can enter AT commands to send SMS like in fig below.
  <img src="https://i.stack.imgur.com/o6lcQ.png" alt="enter image description here"></p>
  
  <p>I want to run those AT commands through PHP.</p>