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 571689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:32:01+00:00 2026-05-13T13:32:01+00:00

I have a PHP CURL request to an HTTPS site which takes a JSON

  • 0

I have a PHP CURL request to an HTTPS site which takes a JSON and request and returns a JSON response. Usually it should not take more than 1 second. But, I have seen that the CURL response time is variable. Sometimes, it takes 4 seconds to respond and sometimes 1.2 seconds. Why is this so and How can I make it faster and process the whole request in less than a second?

Following is the curl response times for the same request in 3 different times..

Array
(
    [url] => https://xx.xx.xxx.xx/site/y
    [content_type] => application/json
    [http_code] => 200
    [header_size] => 198
    [request_size] => 358
    [filetime] => -1
    [ssl_verify_result] => 20
    [redirect_count] => 0
    [total_time] => 4.213941
    [namelookup_time] => 2.1E-5
    [connect_time] => 0.015284
    [pretransfer_time] => 0.722955
    [size_upload] => 222
    [size_download] => 553
    [speed_download] => 131
    [speed_upload] => 52
    [download_content_length] => 0
    [upload_content_length] => 0
    [starttransfer_time] => 4.015112
    [redirect_time] => 0
)


Array
(
    [url] => https://xx.xx.xxx.xx/site/y
    [content_type] => application/json
    [http_code] => 200
    [header_size] => 198
    [request_size] => 358
    [filetime] => -1
    [ssl_verify_result] => 20
    [redirect_count] => 0
    [total_time] => 1.27581
    [namelookup_time] => 8.3E-5
    [connect_time] => 0.016223
    [pretransfer_time] => 0.104996
    [size_upload] => 222
    [size_download] => 553
    [speed_download] => 433
    [speed_upload] => 174
    [download_content_length] => 0
    [upload_content_length] => 0
    [starttransfer_time] => 1.273922
    [redirect_time] => 0
)

Array
(
    [url] => https://xx.xx.xxx.xx/site/y
    [content_type] => application/json
    [http_code] => 200
    [header_size] => 198
    [request_size] => 358
    [filetime] => -1
    [ssl_verify_result] => 20
    [redirect_count] => 0
    [total_time] => 1.294147
    [namelookup_time] => 7.0E-5
    [connect_time] => 0.025723
    [pretransfer_time] => 0.123456
    [size_upload] => 222
    [size_download] => 553
    [speed_download] => 427
    [speed_upload] => 171
    [download_content_length] => 0
    [upload_content_length] => 0
    [starttransfer_time] => 1.292577
    [redirect_time] => 0
)
  • 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-13T13:32:02+00:00Added an answer on May 13, 2026 at 1:32 pm

    What else is the site doing ? If it has a fixed number of threads (say), and each is busy, then your request will have to wait for a thread to service it. If no threads are busy, then it’ll be serviced immediately.

    Of course the simplest scenario is given that the server CPU has finite resources and servicing an indeterminate number of requests, there are no service guaranteees.

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

Sidebar

Ask A Question

Stats

  • Questions 306k
  • Answers 306k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer To the point, you thus want to forward the friendly… May 13, 2026 at 9:11 pm
  • Editorial Team
    Editorial Team added an answer That is called pointer arithmetic. A char* + int results… May 13, 2026 at 9:11 pm
  • Editorial Team
    Editorial Team added an answer Looks like you just need to clear your floats. After… May 13, 2026 at 9:11 pm

Related Questions

I developed a web application, that permits my users to manage some aspects of
Sorry guys, I've been running a mock asking questions on how to integrate wikipedia
I have a page that is making an XML POST-Request to an URL on
I need to make a cURL request to a https URL, but I have
I am losing my mind here. Im looking at a beginners OAuth php package

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.