🔒 Closed Bulk sms

Status
Not open for further replies.
hmmm ... gawin mo po is query mo ang database table mo na naghohold ng mga phonenumbers then store mo sa array.. then traverse mo ang array foreach record.. then foreach record na itatraverse mo is sesendan mo siya ng sms...

// ------ php code ------
$customers = Customer::all(); // retrieve all customers
$total_customer_count = $customer->count(); // kunin ang total count ng customers
$send_counter = 0; // set counter to 0

$error_numbers = array(); // create array variable;

// isa-isahin ang customer list
foreach($customers as $customer){
$result = SMS::send('Hello', $customer->phonenumber); // send sms

// if sent successfully
if($result){
$send_counter++; // increment ang counter, actually optional kung gusto mo
} else {
$error_number[] = $customer->phonenumber; // if failed ang sending lagay natin sa array ang phonenumber niya
}
}

// if all messages are sent then print sa screen na send lahat
if($total_customer_count === $send_counter){
echo 'All sent successfully';
} else {
// else print natin sa screen ang mga numbers na nagfailed sa sending ....
echo "There was a problem sending on the following numbers:"."<br>";
foreach($error_numbers as $number){
echo $number;
}

}

// ------- end of php code -----------

parang ganyan po ang logic... :)
 
hmmm ... gawin mo po is query mo ang database table mo na naghohold ng mga phonenumbers then store mo sa array.. then traverse mo ang array foreach record.. then foreach record na itatraverse mo is sesendan mo siya ng sms...

// ------ php code ------
$customers = Customer::all(); // retrieve all customers
$total_customer_count = $customer->count(); // kunin ang total count ng customers
$send_counter = 0; // set counter to 0

$error_numbers = array(); // create array variable;

// isa-isahin ang customer list
foreach($customers as $customer){
$result = SMS::send('Hello', $customer->phonenumber); // send sms

// if sent successfully
if($result){
$send_counter++; // increment ang counter, actually optional kung gusto mo
} else {
$error_number[] = $customer->phonenumber; // if failed ang sending lagay natin sa array ang phonenumber niya
}
}

// if all messages are sent then print sa screen na send lahat
if($total_customer_count === $send_counter){
echo 'All sent successfully';
} else {
// else print natin sa screen ang mga numbers na nagfailed sa sending ....
echo "There was a problem sending on the following numbers:"."<br>";
foreach($error_numbers as $number){
echo $number;
}

}

// ------- end of php code -----------

parang ganyan po ang logic... :)
naks. bibihira na lang ganito kasipag tumulong
 
hmmm ... gawin mo po is query mo ang database table mo na naghohold ng mga phonenumbers then store mo sa array.. then traverse mo ang array foreach record.. then foreach record na itatraverse mo is sesendan mo siya ng sms...

// ------ php code ------
$customers = Customer::all(); // retrieve all customers
$total_customer_count = $customer->count(); // kunin ang total count ng customers
$send_counter = 0; // set counter to 0

$error_numbers = array(); // create array variable;

// isa-isahin ang customer list
foreach($customers as $customer){
$result = SMS::send('Hello', $customer->phonenumber); // send sms

// if sent successfully
if($result){
$send_counter++; // increment ang counter, actually optional kung gusto mo
} else {
$error_number[] = $customer->phonenumber; // if failed ang sending lagay natin sa array ang phonenumber niya
}
}

// if all messages are sent then print sa screen na send lahat
if($total_customer_count === $send_counter){
echo 'All sent successfully';
} else {
// else print natin sa screen ang mga numbers na nagfailed sa sending ....
echo "There was a problem sending on the following numbers:"."<br>";
foreach($error_numbers as $number){
echo $number;
}

}

// ------- end of php code -----------

parang ganyan po ang logic... :)
hmmm ... gawin mo po is query mo ang database table mo na naghohold ng mga phonenumbers then store mo sa array.. then traverse mo ang array foreach record.. then foreach record na itatraverse mo is sesendan mo siya ng sms...

// ------ php code ------
$customers = Customer::all(); // retrieve all customers
$total_customer_count = $customer->count(); // kunin ang total count ng customers
$send_counter = 0; // set counter to 0

$error_numbers = array(); // create array variable;

// isa-isahin ang customer list
foreach($customers as $customer){
$result = SMS::send('Hello', $customer->phonenumber); // send sms

// if sent successfully
if($result){
$send_counter++; // increment ang counter, actually optional kung gusto mo
} else {
$error_number[] = $customer->phonenumber; // if failed ang sending lagay natin sa array ang phonenumber niya
}
}

// if all messages are sent then print sa screen na send lahat
if($total_customer_count === $send_counter){
echo 'All sent successfully';
} else {
// else print natin sa screen ang mga numbers na nagfailed sa sending ....
echo "There was a problem sending on the following numbers:"."<br>";
foreach($error_numbers as $number){
echo $number;
}

}

// ------- end of php code -----------

parang ganyan po ang logic... :)
salamat po :)
Sir may system ka na nito?
 
Status
Not open for further replies.

About this Thread

  • 9
    Replies
  • 802
    Views
  • 6
    Participants
Last reply from:
JustFriends

Trending Topics

Online now

Members online
1,241
Guests online
2,471
Total visitors
3,712

Forum statistics

Threads
2,294,113
Posts
29,088,726
Members
1,208,082
Latest member
BasemManalao2026
Back
Top