</li>
<li><a href="https://app.box.com/s/dib7a8e078j2mudfpbn6w7vd7uykbch9" rel="nofollow">Download Latest Ready Made API Integrated PHP Script</a>.</li>
<li>Upload the script to your web server using FTP. If you are using localhost with Xampp then move the file to Htdocs folder.</li>
<li>Now open the "<b>sendsms.php</b>" Page and edit your "<b>Token ID</b>" by replacing the "<b>Your Token Here</b>" Text.</li>
</ul>
<pre class="brush: js;"><?php
$token = 'Your Token Here';
$mobile = mysql_real_escape_string($_POST['phone']);
$msg = mysql_real_escape_string($_POST['message']);
$site = 'Your Site Address Here';
$url = "http://api.fast2sms.com/sms.php?token=".$token."&mob=".$mobile."&mess=".$msg."&sender=".$site."&route=0";
$homepage = file_get_contents($url);
if($homepage)
{
echo "Message Send Compleated...";
}
else{
echo "Something Went Wrong...";
}
?></pre>
<ul style="text-align: left;">
<li>The above code is the primary code. After user click the submit button, The form will post the phone number and message to the sendsms.php. The <b>$mobile</b> and <b>$msg</b> will receive it and pass the value to the the API. </li>
<li>On the above code, you have to change the $token value to your Token and <b>$site</b> value to your site address.</li>
<li>Now open the <b>index.php</b> via your browser and start to send sms.</li>
<li>You are done. </li>
</ul>
You can also integrate the code with your web application. If you have having any trouble with the integration method. You can use forum.how.in to ask it and get your problem solved.<br />
<iframe allowfullscreen="" frameborder="0" height="350" src="https://www.youtube.com/embed/X1SKtF9vORM" width="820"></iframe>
<br />
<h4 style="text-align: left;">
Suggested Article for PHP Developers:</h4>
<ul style="text-align: left;">
<li>
<a href="http://www.howi.in/2015/07/way2sms-working-api-php-script.html">Way2SMS Working PHP API Script to Send Free SMS.</a></li>
<li><a href="http://www.howi.in/2015/11/add-ckeditor-in-php-page-step-by-step-tutorial.html">How to Add CKEditor to Your PHP Page Step By Step Tutorial. </a> </li>
<li><a href="http://www.howi.in/2017/06/create-unique-id-for-each-device-using-javascript.html">How to Create Unique ID for Each Browser Using Javascript.</a></li>
<li><a href="http://www.howi.in/2017/06/how-to-grab-other-website-content-using-curl-php.html">How to Grab Other Website Content Using PHP Curl Code.</a> </li>
</ul>
I hope you well enjoyed this article. If you have any doubts related to this article. Comment it on the below comment box or join or forum via <a href="http://forum.howi.in/">forum.howi.in</a>.Thanks</div>
</textarea>
<div class='post-summary' id='summaryContainer-6332645632866359178'>
<a class='thumbimgx' href='https://www.howi.in/2017/07/php-code-to-send-sms-to-mobile-from-website-or-localhost.html' target='_blank' title='PHP Code to Send SMS to Mobile from Website or Localhost'><img alt='PHP Code to Send SMS to Mobile from Website or Localhost' class='post-thumbnail' height='72' itemprop='image' src='https://2.bp.blogspot.com/-iTz7Pms0dWw/WXTeQ4yRvUI/AAAAAAAAKNo/WAZlfovn_tk_zq4gcCB7EfAPZIH6nPvvACLcBGAs/s72-c/WordPress%25281%2529.png' width='72'/></a>
<strong><a href='https://www.howi.in/2017/07/php-code-to-send-sms-to-mobile-from-website-or-localhost.html' target='_blank' title='PHP Code to Send SMS to Mobile from Website or Localhost'>PHP Code to Send SMS to Mobile from Website or Localhost</a></strong>
<p> Introduction: Now a days web developers are using SMS for verification purpose, because they think it is the most trusted method for v...</p>
</div>
<div class='post-more-link'><a class='moreinfo' href='#' title='more details'>+</a>
<a href='https://www.howi.in/2017/07/php-code-to-send-sms-to-mobile-from-website-or-localhost.html#more' title='Read more 禄 PHP Code to Send SMS to Mobile from Website or Localhost'>
Read more »
</a>
</div>
<script>createPostSummary("postData-6332645632866359178","summaryContainer-6332645632866359178","PHP Code to Send SMS to Mobile from Website or Localhost","https://www.howi.in/2017/07/php-code-to-send-sms-to-mobile-from-website-or-localhost.html");</script>
<div style='clear: both;'></div>
</div>
<div class='post-footer'>
<div class='post-footer-line post-footer-line-1'>
<div class='post-timestamp'>
<a class='timestamp-link' href='https://www.howi.in/2017/07/php-code-to-send-sms-to-mobile-from-website-or-localhost.html' rel='bookmark' title='permanent link'><abbr class='published update' title='2017-07-23T10:40:00-07:00'>10:40 AM</abbr></a>
</div>
<div class='post-author vcard'>
<span class='fn'>
<a href='https://www.blogger.com/profile/06296305909063576743' rel='author' title='author profile'>
Muhsin Mohamed PC
</a>
</span>
</div>
<div class='post-comment-link'>
</div>
<div class='post-labels'>
<span>
<a href='https://www.howi.in/search/label/Development' rel='tag,nofollow'>Development</a>,
<a href='https://www.howi.in/search/label/Php' rel='tag,nofollow'>Php</a>,
<a href='https://www.howi.in/search/label/Tutorial' rel='tag,nofollow'>Tutorial</a>
</span>
</div>
<div class='post-location'>
</div>
<div class='post-share-buttons goog-inline-block'>
<div class='addthis_native_toolbox'></div>
</div>
<span class='post-icons'>
</span>
<span class='item-control blog-admin pid-1305465561'>
<a href='https://www.blogger.com/post-edit.g?blogID=8188666969217622696&postID=6332645632866359178&from=pencil' title='Edit Post'>
<img alt="" class="icon-action" height="18" src="//img2.blogblog.com/img/icon18_edit_allbkg.gif" width="18">
</a>
</span>
</div>
<div class='post-footer-line post-footer-line-2'></div>
<div class='post-footer-line post-footer-line-3'></div>
<div class='post-footbg'></div>
</div>
<span class='datex hidex'>
<strong></strong>
<span></span>
<small></small>
</span>
</article>
</div>
</div></div>
<!--Can't find substitution for tag [adEnd]-->
</div>
<div class='blog-pager' id='blog-pager'>
<span id='blog-pager-older-link'>
<a class='blog-pager-older-link' href='https://www.howi.in/search?updated-max=2017-07-23T10:40:00-07:00' id='Blog1_blog-pager-older-link' title='Older Posts'>Older Posts</a>
Back to home |
File page
Subscribe |
Register |
Login
| N