Hello friends ajj me apko btaunga ki Ham kis parkar se ham fast2sms api ka use karke message send kar sakte hai Fast 2sms website dwara hame kuch message testing perpose ke liye free me diye jate hai jiska use karke ham apne code ke testing kar sakte hai ki hmara code work kar raha hai ya nahi.
Steps for send message with fast2sms api in php-
1-sabse pehle aap fast2sms.com website open kijiye
2-ab app is website par signup kar lijiye
3-ab aap login kar ligiye.
4-yanha dashboard me redirect hone ke bad aap dev api par click kijiye
5-yanha ap dev api ke ander se apni api key collect kar lijiye or ise niche diye gye code me paste kar dijiye.
Index.php
<?php
if(isset($_POST['submit'])){
$curl = curl_init();
$mobile=$_POST['mobile'];
curl_setopt_array($curl, array(
CURLOPT_URL => "https://www.fast2sms.com/dev/bulk?authorization=EnterYourApiKeyHere&sender_id=FSTSMS&message=".urlencode('This is a test message')."&language=english&route=p&numbers=".urlencode($mobile)."&flash=1",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
}
?>
<form action="" method="post">
<h1> Send Sms With Fast2SMS Api In Php</h1>
Enter Mobile Number<input type="text" name="mobile" placeholder="Mobile"><br><br>
<input type="submit" name="submit" value="submit"/>
</form>
Ab aap is script ko run karwa sakte ho.iske liye apke system ,hosting me curl ka enable hona jarrurti hai..
Aap is fast2sms ka use karke mobile otp verification me otp generate karke be bhej sakte ho… aap hmare mobile otp verification scipt me fast 2 sms api ka use karke script banana ki try kare practice ke liye agar apko koi problem aye to aap comment me puch sakte ho me apki puri help karunga.
Thank You
Team Gajabwap Web In Hindi
3 comments
Click here for commentsThanks for sharing. Use MsgClub Bulk sms api php and send messages in php script. It is very easy process.
Replywww.fast2sms.xyz
ReplyBulk SMS Service Provider in Bangalore
ReplyConversionConversion EmoticonEmoticon