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

  • Home
  • SEARCH
  • 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 6118291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:25:09+00:00 2026-05-23T15:25:09+00:00

I am running calls onto PayPal’s TransactionSearch API through PHP cURL. Unfortunately, the API

  • 0

I am running calls onto PayPal’s TransactionSearch API through PHP cURL.

Unfortunately, the API is very slow to respond, sometimes taking anywhere from 30 seconds to more than 5 minutes (depending on the number of records returned from the API) for a single customer.

At the moment, the script is running off a cron job, and looping through each customer one by one. However, if the number of customers scale up, the entire process would take a very long time (few hours) to complete. This is not good enough.

Essentially, I need to run (and process) multiple API calls simultaneously. What’s the best way to achieve this?

  • 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-23T15:25:10+00:00Added an answer on May 23, 2026 at 3:25 pm

    Since the bottleneck is the remote server, I suggest using curl_multi_exec. You’ll be processing a big number of HTTP connections at once and then process their results in one thread.

    This is not the fastest solution, which would be to process responses as soon as they’re available in multiple threads, but this approach can make processing 50+ times faster without significant changes.

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

Sidebar

Related Questions

I'm running a cronjob that calls a php script. I get failed to open
We've got a scheduling application running that calls a WCF service to run nightly
I have a Perl/POE/Tk script running on Win32 ActivePerl that calls executables using system
I'm running in a strange issue. My controller calls a drb object @request_handler =
Scenario: A client calls WebService A on the LAN. WebService A is running under
I'm running a library via JNI (I didn't write it), and internally it calls
I am running ASP.NET MVC Beta. I have an AJAX call running through jQuery
I have some (potentially) long-running ajax calls that I would like to abort if
One of my API calls can result in updates to a large number of
I got a PHP web service that had been running great for a long

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.