|PHP code required: How can i send sms using php program?
In order to send sms from php script, you would be required to call APIs provided by messaging service providers.
Messaging providers are the companies who act as an intermediary between Programmers and Telecom operators. They publish APIs which can integrated into any programming language for adding Addon functionality to your application.
Here is one such simple example.
### DO NOT Change anything below this line
$agent= 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)';
$url = "https://2factor.in/API/V1/$YourAPIKey/ADDON_SERVICES/SEND/TSMS";
$ch = curl_init();
curl_setopt($ch,CURLOPT_POST,true); curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); curl_setopt($ch,CURLOPT_POSTFIELDS,"From=$From&To=$To&Msg=$Msg"); curl_setopt($ch, CURLOPT_USERAGENT, $agent);echo curl_exec($ch);