title: How to send SMS using PHP CURL function
body: <p>I have an account in a website by which I can send sms to mobile phones. In order to do that at first I need to log in using my id and password and then a page shows up where I put the recipient's  mobile number and then my message and finally hit the button to send the message.</p>
  
  <p>Now one of my friends told me that I can send sms from my own application through this website using PHP Curl function. I didn't have any prior idea about CURL function so I googled it but I couldn't figure out how to do this.   I have checked the HTML code of the login page and the page from where I can send the sms of that website and I am posting it below.</p>
  
  <p>Would you please kindly show me how to send sms using CURL function or any other way.. through this website..</p>
  
  <p>Thanks in Advance :) </p>
  
  <p>Form1</p>
  
  <pre><code> &lt;form name="form" action="/websms/index.php" method="POST"&gt;
   &lt;input type="hidden" name="HTMLForm_formname" value="form"&gt;
  
  
    &lt;table align="center" size="300" border="0" class="list"&gt;
    &lt;tr class="r1"&gt;
      &lt;th colspan="3" class="left"&gt;
          &lt;label id="label_login_title" for="login_title" class="HTMLForm-label"&gt;User  Login&lt;/label&gt;
  
         &lt;/th&gt;
  &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td align="right" valign="top"&gt;
          &lt;label id="label_mobile_no" for="mobile_no" class="HTMLForm-label"&gt;Mobile Number&lt;/label&gt;
      &lt;/td&gt;
  
       &lt;td&gt;
          &lt;input type="text" id="mobile_no" name="mobile_no" size="20" maxlength="11" value="" onkeypress="return checkNumberOnly(event)" class="HTMLForm-text"&gt; 
      &lt;/td&gt;
  
  
     &lt;/tr&gt;
     &lt;tr&gt; 
        &lt;td align="right" valign="top"&gt;
          &lt;label id="label_password" for="password" class="HTMLForm-label"&gt;Password&lt;/label&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;input type="password" id="password" name="password" value="" class="HTMLForm-password" size="20"&gt;
      &lt;/td&gt;
  
      &lt;/tr&gt;
  
         &lt;tr&gt;
           &lt;td colspan="3" align="center"&gt;
              &lt;input type="submit" id="submit" name="submit" value="Login"  class="button_all_action"&gt;
              &lt;input type="hidden" id="submit_login" name="submit_login" value="1"&gt;
        &lt;/td&gt;
       &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/form&gt;
  </code></pre>
  
  <p>Second Form</p>
  
  <pre><code>&lt;form name="form" action="javascript:get(document.getElementById('form'));" method="POST"&gt;
  &lt;input type="hidden" name="HTMLForm_formname" value="form"&gt;
  
  
  &lt;table align="center" size="450" border="0" class="list"&gt;
  
  
  &lt;tr class="r2"&gt;
      &lt;th class="left"&gt;
          &lt;label id="label_send_to_no" for="send_to_no" class="HTMLForm-label"&gt;To&lt;/label&gt;
      &lt;/th&gt;
      &lt;td class="left"&gt;
          &lt;textarea id="send_to_no" name="send_to_no" class="HTMLForm-textarea" onkeypress="checkValidGPNumner(document.form.send_to_no)" onchange="checkValidGPNumner(document.form.send_to_no)" onkeyup="checkValidGPNumner(document.form.send_to_no)" wrap="soft" style="width:250px;height:50px"&gt;&lt;/textarea&gt;  
  
      &lt;/td&gt;    
    &lt;/tr&gt;
  
   &lt;tr class="r1"&gt;
  
      &lt;th class="left"&gt;
          &lt;label id="label_message" for="message" class="HTMLForm-label"&gt;Message&lt;/label&gt;
      &lt;/th&gt;
      &lt;td class="left"&gt;
          &lt;textarea id="message" name="message" class="HTMLForm-textarea" onkeypress="textCounter(document.form.message,document.form.counter_message,160)" onchange="textCounter(document.form.message,document.form.counter_message,160)" onkeyup="textCounter(document.form.message,document.form.counter_message,160)" wrap="soft" style="width:250px;height:130px"&gt;&lt;/textarea&gt;
  
         &lt;input type="text" id="counter_message" name="counter_message" size="5" value="" readonly="" class="HTMLForm-text"&gt; &lt;label id="label_char_remain" for="char_remain" class="HTMLForm-label"&gt;Character remained&lt;/label&gt; 
      &lt;/td&gt;
  
   &lt;/tr&gt;
  
       &lt;tr class="r2"&gt;
       &lt;td colspan="2" class="center"&gt;
          &lt;input type="submit" id="submit" name="submit" value="Send" class="button_all_action"&gt;
          &lt;input type="hidden" id="mid" name="mid" value="1"&gt;
          &lt;input type="hidden" id="submit_sms" name="submit_sms" value="1"&gt;
      &lt;/td&gt;
      &lt;/tr&gt;
       &lt;/table&gt;
     &lt;/form&gt;
  </code></pre>