🔒 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.

Similar threads

About this Thread

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

Trending Topics

Online now

Members online
1,156
Guests online
3,212
Total visitors
4,368

Forum statistics

Threads
2,330,356
Posts
29,253,735
Members
1,153,008
Latest member
Punchkun2229
Back
Top