What's new

Closed Bulksms

Status
Not open for further replies.

Clay_dropdead

Honorary Poster
Joined
Feb 28, 2017
Posts
332
Reaction
206
Points
229
Guys pa help naman about sa bulksms kailangan masend lahat ng laman ng database na mga phone numbers
Gamit ko checkbox array
 
bale parang ganito po gawin mo po... :)

PHP:
/* Step 1: retrieve all numbers from database table or lahat ng nakacheckbox
 Step 2: then magloop ka po ... kung anong preferred mo
 Step 3: Send sms per phone number
 Step 4: Check if success or not (dapat meron kang counter kung how many tries)
 Step 5: if success store mo sa isang array lahat ng nagsuccess na messages per phonenumber
 Step 6: if error store mo rin sa array kung saan meron nagfailed na send.
 Step 7: return ka ng report kung saan makikita lahat ng nagfailed then lagay ka button to retry send sa lahat ng nagfailed na phonenumbers.

then repeat all process until lahat magsuccess... 
*/ 

$customers = Customer::all();
$failed = array();
$success = array();

foreach($customers as $customer){ // all customer numbers
     
     $result = false; // set default status as false since hindi pa naman nagsesend

     for($cnt = 1; $cnt <= 3; $cnt++){ // pwede wala na to pero depende sa iyo kung may number of tries ka
         
        $result = Sms:send($customer->number,'Hello'); // check if sucess and send or not... depende sa API
        
        if($result == true) { break; } // if true then break from loop.
        
     }

      if($result){ // if true then push to success

           array_push($success,$customer->number);

      } else { // else push to failed list
 
           array_push($failed,$customer->number);
 
      }

}

// then display result in a page... then lagay ka naman button to try sending to those failed numbers. :)
 
Last edited by a moderator:
bale parang ganito po gawin mo po... :)

PHP:
/* Step 1: retrieve all numbers from database table or lahat ng nakacheckbox
 Step 2: then magloop ka po ... kung anong preferred mo
 Step 3: Send sms per phone number
 Step 4: Check if success or not (dapat meron kang counter kung how many tries)
 Step 5: if success store mo sa isang array lahat ng nagsuccess na messages per phonenumber
 Step 6: if error store mo rin sa array kung saan meron nagfailed na send.
 Step 7: return ka ng report kung saan makikita lahat ng nagfailed then lagay ka button to retry send sa lahat ng nagfailed na phonenumbers.

then repeat all process until lahat magsuccess...
*/

$customers = Customer::all();
$failed = array();
$success = array();

foreach($customers as $customer){ // all customer numbers
    
     $result = false; // set default status as false since hindi pa naman nagsesend

     for($cnt = 1; $cnt <= 3; $cnt++){ // pwede wala na to pero depende sa iyo kung may number of tries ka
        
        $result = Sms:send($customer->number,'Hello'); // check if sucess and send or not... depende sa API
       
        if($result == true) { break; } // if true then break from loop.
       
     }

      if($result){ // if true then push to success

           array_push($success,$customer->number);

      } else { // else push to failed list
 
           array_push($failed,$customer->number);
 
      }

}

// then display result in a page... then lagay ka naman button to try sending to those failed numbers. :)

boss patulong may sample system ka nito ano po api n a gamit nyo?
 
Last edited by a moderator:
boss patulong may sample system ka nito ano po api n a gamit nyo?
wala ako sample system sir eh ... basta ang process or flow kung paano magbulk send is yung pinost ko sa taas... tapos sa api naman po is meron kasi kami gsm gateway(openvox) sa office so sa website ng supplier ako kumuha meron kasi sila downloadable api doon. pero kung Saas naman yung provider mo marami naman mga online gsm gateway tapos meron na yan sila api ibibigay sa iyo sa pagsend and receive ng messages.:)

Edit: basta ang importante lang naman po is ang api mo na ginamit. Subukan mo muna magsend ng sms sa number mo. Then kung nagsuccess, saka ka na po magbulk sms. tska isa pa po pala, meron kasi ibang modem is 155-160 characters lang ang minimum per send so basahin mo lang po ang api documentation ng provider kung anong code ang gagamitin sa more than 160 characters in 1 send lang sa number.
 
Last edited by a moderator:
wala ako sample system sir eh ... basta ang process or flow kung paano magbulk send is yung pinost ko sa taas... tapos sa api naman po is meron kasi kami gsm gateway(openvox) sa office so sa website ng supplier ako kumuha meron kasi sila downloadable api doon. pero kung Saas naman yung provider mo marami naman mga online gsm gateway tapos meron na yan sila api ibibigay sa iyo sa pagsend and receive ng messages.:)

Edit: basta ang importante lang naman po is ang api mo na ginamit. Subukan mo muna magsend ng sms sa number mo. Then kung nagsuccess, saka ka na po magbulk sms. tska isa pa po pala, meron kasi ibang modem is 155-160 characters lang ang minimum per send so basahin mo lang po ang api documentation ng provider kung anong code ang gagamitin sa more than 160 characters in 1 send lang sa number.
really helpful sir thanks sa logic
 
Last edited by a moderator:
$arrNum = $_POST['number'];

for each $arrNum as $x

//Bale po ung var x ang hohold sa value nung //codes to send SMS
 
Status
Not open for further replies.

Similar threads

Back
Top