Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6948073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:46:29+00:00 2026-05-27T13:46:29+00:00

I have to do the following: I have a Daemon set up that every

  • 0

I have to do the following:

I have a Daemon set up that every hour, executes the nohup command (by calling exec(‘nohup sms.php ….’), and sms.php goes through a database of users and sends an sms message to each user at the same time. It does so by contacting (via curl) a third party message service.

So sms.php is structured as follows:

$sql = 'SELECT * FROM users'.
$q = execute sql query

while($r = ....)
{
   // url is the url to the third party service that handles sending sms 
   $ch = curl_init($url);
   call curl functions
   $data = curl_exec();
}

Basically, I want sms.php to be able to handle sending sms messages to over 1000 users at the same time. So users should be getting the sms at the same time.

How can I improve the code to allow for:
– sending the sms at the same time to all users
– handling over 1000 users (meaning that sending the sms messages should not take a long time for each user, and apache or PHP can not block me for sending that many)

EDIT: I do not want to use external APIs. Just the curl functions. Thanks!

EDIT: Third party server provides a url that we have to access using CURL to send SMS messages.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:46:30+00:00Added an answer on May 27, 2026 at 1:46 pm

    I have no clue how the third party service work,
    so probably that is no option for sending multiple SMS in a single API call.

    Use the curl_multi_exec.
    I don’t think concurrently fire 1000 request is possible,
    but 100~200 requests should be no problem.

    You can do a check at your code level,
    at the same loop,
    do a $cnt++,
    when $cnt=100,
    execute multi curl,
    reset $cnt,
    repeat until end of the loop.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a daemon written in PHP. I use the following command to call
I have a daemon that does the following retrieves site members from a mysql
I have this bash script on the server that runs every hour, via cron.
I have following code in my application: // to set tip - photo in
I have a daemon that launchd runs at system boot (OS X). I need
I have the following code: #include <libubuntuone-1.0/u1-music-store.h> #include <libsyncdaemon-1.0/libsyncdaemon/syncdaemon-authentication.h> #include <libsyncdaemon-1.0/libsyncdaemon/syncdaemon-credentials.h> #include <libsyncdaemon-1.0/libsyncdaemon/syncdaemon-daemon.h> static
I have a command-line python app that is a service - i.e. it waits
I have set up a openVPN tunnel using the following server side configuration: port
I have created a small daemon (basically a console application that hides the console
I have a daemon process, set up using launchd on Mac. The daemon is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.