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

Related Questions

All, I have to request a URL which returns a JSON request. I am
I have been trying to post login credentials to an https site using cURL
I have this curl request below, which was successfully troubleshooted in another post. Right
I have a need to rename a file after download using php cURL. Here's
I have a PHP script that uses CURL to fetch a remote page and
I have installed WAMP and running PHP scripts on localhost. I have enabled cURL.
I'm implementing Google Maps service with PHP/CURL and currently have a problem with Maps
I have a site that has a simple API which can be used via
Ok so i have a curl request I am trying to make. $ch =
I am trying to form the following CURL post request through PHP? How do

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.