🔒 Closed Bulksms

Status
Not open for further replies.
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. :)
 
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?
 
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.
 
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
 
Status
Not open for further replies.

About this Thread

  • 7
    Replies
  • 908
    Views
  • 4
    Participants
Last reply from:
femfemsarap

Trending Topics

Online now

Members online
354
Guests online
608
Total visitors
962

Forum statistics

Threads
2,279,398
Posts
28,990,462
Members
1,226,869
Latest member
Owengheart
Back
Top