Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
Saturday at 11:44 PM
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
Computers & Internet
Software Development
PHP DEVELOP HELP
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="wmdpwijerathne" data-source="post: 19934907" data-attributes="member: 510060"><p><span style="font-size: 15px">යාලුවනේ මම SMS API gateway එකක් හදනවා (dialog ලගේ තම API එක) දැනට database එකෙන් customers ලාට dynamic sms යවන්න පුළුවන් .....</span></p><p><span style="font-size: 15px"></span></p><p><span style="font-size: 15px">එත් අවුල තියෙන්නේ message එකේ space තිබ්බොත් sms වෙන්නේ පලවෙනි word එක විතරයි </span></p><p><span style="font-size: 15px"></span></p><p>මෙන්න code එක </p><p></p><p><?php </p><p> require_once(dirname(__FILE__)."/classes/db-connection.php");</p><p> $obj = new dbconnection();</p><p> $con = $obj->getcon();</p><p> </p><p> $id_sms=$_POST["id_sms"];</p><p> $today=date("Y/m/d/h");</p><p> $pass="141**************";</p><p></p><p> $sqlstatesms="SELECT * FROM msgtable WHERE id_sms ='$id_sms' ;";</p><p> $resultsms=mysql_query($sqlstatesms,$con) or die ("SQL Error".mysql_error());</p><p> $recordsms=mysql_fetch_array($resultsms);</p><p> $msg_sms=$recordsms["msg"]; <span style="color: Red">// get the msg from db</span></p><p></p><p> $sqlstate="SELECT * FROM customer_reg_sms WHERE cuscontactnu1 LIKE '7%' ;";</p><p> $result=mysql_query($sqlstate,$con) or die ("SQL Error".mysql_error());</p><p> $rownumber=mysql_num_rows($result);</p><p> </p><p></p><p> while($record=mysql_fetch_array($result)){</p><p> $cusid=$record["customerid"]; </p><p> $bal=$record["balance"]; </p><p> $lp=$record["lastpayment"]; </p><p> $getp=$record["cuscontactnu1"];</p><p> $pnumber ="94".$getp;</p><p></p><p> $msg=$msg_sms." ".$bal." and your last payment is".$lp."***xxxxxxxxxxxxxxxxxxxx (011-5******)***"; <span style="color: red">//set the msg</span></p><p><span style="color: red"> </span></p><p>// echo $y = "https://cpsolutions.dialog.lk/index.php/cbs/sms/send?destination=".$pnumber."&q=".$pass."&message=".$msg; ?> </br><?php</p><p></p><p><span style="font-size: 15px"><span style="color: Blue">when echo this "$y" out come will be </span></span></p><p><span style="font-size: 15px"><span style="color: Magenta">https://cpsolutions.dialog.lk/index.php/cbs/sms/send?destination=94778119027&q=14181866758&message=Dear customer your due amount is 2000.00 and your last payment is 4500.00***xxxxxxxxxxxxx(011-xxxxxxx)*** </span></span></p><p></p><p><span style="color: Red"> If I copy and paste the above URL on address bar (with correct password) complete SMS send successfully </span></p><p></p><p>//$resultstu =file_get_contents("$y");</p><p></p><p><span style="color: red">above code I used to get the response value from the dialog API gateway</span></p><p><span style="color: red">and it gives correctly ,,,but sms send with the first word only in this..only "Dear"</span></p><p></p><p>} </p><p></p><p></p><p></p><p>$obj->close();</p></blockquote><p></p>
[QUOTE="wmdpwijerathne, post: 19934907, member: 510060"] [SIZE="4"]යාලුවනේ මම SMS API gateway එකක් හදනවා (dialog ලගේ තම API එක) දැනට database එකෙන් customers ලාට dynamic sms යවන්න පුළුවන් ..... එත් අවුල තියෙන්නේ message එකේ space තිබ්බොත් sms වෙන්නේ පලවෙනි word එක විතරයි [/SIZE] මෙන්න code එක <?php require_once(dirname(__FILE__)."/classes/db-connection.php"); $obj = new dbconnection(); $con = $obj->getcon(); $id_sms=$_POST["id_sms"]; $today=date("Y/m/d/h"); $pass="141**************"; $sqlstatesms="SELECT * FROM msgtable WHERE id_sms ='$id_sms' ;"; $resultsms=mysql_query($sqlstatesms,$con) or die ("SQL Error".mysql_error()); $recordsms=mysql_fetch_array($resultsms); $msg_sms=$recordsms["msg"]; [COLOR="Red"]// get the msg from db[/COLOR] $sqlstate="SELECT * FROM customer_reg_sms WHERE cuscontactnu1 LIKE '7%' ;"; $result=mysql_query($sqlstate,$con) or die ("SQL Error".mysql_error()); $rownumber=mysql_num_rows($result); while($record=mysql_fetch_array($result)){ $cusid=$record["customerid"]; $bal=$record["balance"]; $lp=$record["lastpayment"]; $getp=$record["cuscontactnu1"]; $pnumber ="94".$getp; $msg=$msg_sms." ".$bal." and your last payment is".$lp."***xxxxxxxxxxxxxxxxxxxx (011-5******)***"; [COLOR="red"]//set the msg [/COLOR] // echo $y = "https://cpsolutions.dialog.lk/index.php/cbs/sms/send?destination=".$pnumber."&q=".$pass."&message=".$msg; ?> </br><?php [SIZE="4"][COLOR="Blue"]when echo this "$y" out come will be [/COLOR] [COLOR="Magenta"]https://cpsolutions.dialog.lk/index.php/cbs/sms/send?destination=94778119027&q=14181866758&message=Dear customer your due amount is 2000.00 and your last payment is 4500.00***xxxxxxxxxxxxx(011-xxxxxxx)*** [/COLOR][/SIZE] [COLOR="Red"] If I copy and paste the above URL on address bar (with correct password) complete SMS send successfully [/COLOR] //$resultstu =file_get_contents("$y"); [COLOR="red"]above code I used to get the response value from the dialog API gateway and it gives correctly ,,,but sms send with the first word only in this..only "Dear"[/COLOR] } $obj->close(); [/QUOTE]
Insert quotes…
Verification
Haya warak paha keeyada? (haya wadi kireema paha)
Post reply
Top
Bottom