Mobile APP push notification sending one by one and it's slow


* in your description, and after reviewing the small code below, share a relevant description on how you intend to fix the issue. ( for project within the budget I provide extra $20 bonus if the issue is fixed)

The code below is responsible for sending notification to users, we noticed only when we got 3000 users, that the code is taking more than 70 seconds to leave our backend and start sending to users, and this is a long time. My requirements is to send in max (5sec) and it's doable as many other apps send to millions in seconds.

As you can see, my previous dev. create the array to send one by one. maybe theres a way to send them once. to get the budget+bonus the code should be tested in real time.


$alertlists =$db->LoadObjectList();

//echo "<pre>";


foreach($alertlists AS $alertlist){

if($alertlist->isnotification == '1')


// for android

if($alertlist->device_type== "Android")


$notificationdata = array(

'registration_ids' => array($alertlist->gcm_regid),

'data' => array("message" => strip_tags($alertlist->video_des),









$api_key = "AIzaSyBNxHKFlEhiJYYiT31Iz9dVXuYyeZps";

$headers = array(

'Authorization: key='.$api_key,'Content-Type: application/json'


$url = '[login to view URL]';

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

curl_setopt($ch, CURLOPT_POST, true);

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);


curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(($notificationdata)));

$result = curl_exec($ch);

// print_r($result);






$notificationdata = array();

$notificationdata['device_token'] = $alertlist->device_id;

$notificationdata['device_type'] = $alertlist->device_type;

$notificationdata['message'] = @strip_tags($alertlist->video_des);


$notificationdata['userid'] = $alertlist->user_id;

$notificationdata['isnotification'] = $alertlist->isnotification;

$notificationdata['issound'] = $alertlist->issound;

$notificationdata['gonotification'] = 'NO';

$checkalertflag = JGFields::sendpushnotification($notificationdata);




return true;

Taidot: Android, iPhone, PHP

Näytä lisää: php and mobile dev, how to get ios apps on android, how to get apps on android, how to create a mobile app, android app push notification commercial, mobile web app push notification, iphone push notification app android, push notification app android phonegap, mobile app push notification, push notification services jquery mobile web app, build mobile app push notification server, custom push notification app, android sip app windows mobile, app push notification

Tietoa työnantajasta:
( 150 arvostelua ) Ramallah, Palestinian Territory

Projektin tunnus: #9727257

2 freelancers are bidding on average $71 for this job


hii i can fix [login to view URL] start soon_______________________________________________________________________________________________________________________

$30 USD 0 päivässä
(76 arvostelua)

Hi, I'm offering a bid if you can't find a solution with another developer. I have a few ideas to reduce both the looping and maybe the messages send but I would need time to test it before I would say it's a worki Lisää

$111 USD 4 päivässä
(7 arvostelua)