See documentation: http://www.php.net/manual/en/function.curl-setopt.php
CURLOPT_CONNECTTIMEOUT
– The number of seconds to wait while trying to connect. Use 0 to wait indefinitely.CURLOPT_TIMEOUT
– The maximum number of seconds to allow cURL functions to execute.
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0); curl_setopt($ch, CURLOPT_TIMEOUT, 400); //timeout in seconds
also don’t forget to enlarge time execution of php script self:
set_time_limit(0);// to infinity for example
Related Posts:
- How to define the basic HTTP authentication using cURL correctly?
- How to define the basic HTTP authentication using cURL correctly?
- PHP + curl, HTTP POST sample code?
- How do I send a POST request with PHP?
- Can PHP cURL retrieve response headers AND body in a single request?
- Is curl required?
- Should a 502 HTTP status code be used if a proxy receives no response at all?
- What is the difference between a URI, a URL and a URN?
- How do I get a YouTube video thumbnail from the YouTube API?
- HTTP Status 504
- What is the difference between POST and GET? [duplicate]
- What’s the net::ERR_HTTP2_PROTOCOL_ERROR about?
- Do I need Content-Type: application/octet-stream for file download?
- Problem HTTP error 403 in Python 3 Web Scraping
- application/x-www-form-urlencoded or multipart/form-data?
- Problem HTTP error 403 in Python 3 Web Scraping
- What’s the net::ERR_HTTP2_PROTOCOL_ERROR about?
- application/x-www-form-urlencoded or multipart/form-data?
- Is 418 “I’m a teapot” really an HTTP response code?
- “Cannot GET /” with Connect on Node.js
- “CAUTION: provisional headers are shown” in Chrome debugger
- What’s the difference between a POST and a PUT HTTP REQUEST?
- How to do a PUT request with cURL?
- Why is it said that “HTTP is a stateless protocol”?
- What’s the difference between using application/csv vs text/csv? [duplicate]
- Can curl make a connection to any TCP ports, not just HTTP/HTTPS?
- How to handle ETIMEDOUT error?
- Call to undefined function curl_init().?
- What are all the possible values for HTTP “Content-Type” header?
- CURL ERROR: Recv failure: Connection reset by peer – PHP Curl
- cURL error 60: SSL certificate: unable to get local issuer certificate
- What is the difference between PUT, POST and PATCH?
- curl POST format for CURLOPT_POSTFIELDS
- HTTP Error 411, The request must be chunked or have a content length
- PHP cURL custom headers
- What’s the difference between “Request Payload” vs “Form Data” as seen in Chrome dev tools Network tab
- Exception in thread “main” java.net.NoRouteToHostException: No route to host
- ndroid 8: Cleartext HTTP traffic not permitted
- PHP cURL HTTP PUT
- How to send a GET request from PHP?
- file_get_contents( ) not working
- Error:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
- How are parameters sent in an HTTP POST request?
- Why am I suddenly getting a “Blocked loading mixed active content” issue in Firefox?
- How to POST JSON Data With PHP cURL?
- wget: unable to resolve host address `http’
- Are HTTP headers case-sensitive?
- When looking at the differences between X-Auth-Token vs Authorization headers, which is preferred?
- WordPress HTTP parameter pollution
- Does WordPress send data about your blog to WordPress.org or Automattic?
- Hiding WordPress REST API v2 endpoints from public viewing
- Uploading media with the REST API
- Where to get information about array fields in $_REQUEST?
- cURL 28 error after switch from to brew php 7.2 on localhost
- Does WordPress only support HTTP 1.1?
- Creating a post with the REST API, curl and oauth returning 401 error
- HTTP request on localhost failing
- How can I use CURLOPT_USERPWD in wp_remote_post?
- How do I troubleshoot responses with WP HTTP API?
- How to set status codes such as 401 and 403?
- The resource was preloaded using link preload but not used within a few seconds
- Why Better WP security plugin returns 418 I’m a Teapot “error”?
- cURL error 60: SSL certificate problem: unable to get local issuer certificate
- Use wp_remote_get to get JSON instagram feed from public profile
- using wp_remote_get to retrieve own url on local host
- Can I use HTTP POSTs? Is there a better alternative?
- Creating login session via CURL
- Warning: Use of undefined constant HTTP_USER_AGENT – assumed ‘HTTP_USER_AGENT’ (this will throw an Error in a future version of PHP)
- Is there an equivalent to WP_Error object I can return in the case of a successful REST request?
- Where Does WordPress Make cURL Requests? How To Add cURL Option
- Enable CORS in wordpress
- export a csv file from the database with a cronjob
- Programmatic Login from 3rd Party site
- get post content of particular post by url
- Change port of wordpress
- WordPress from url get external source title
- How to get value of custom http header?
- Several times request to load plugins when sending one request
- why is $_REQUESt[‘redirect_to’] empty?
- I am receiving a pluggable.php warning sign on my only http:// page
- WordPress transient not working with WP Engine
- How to send a HTTP Post request using PHP Curl and WordPress
- REST API works in browser and via AJAX but fails via cURL
- cURL error 6 on news area, and also won’t auto update
- Post to WordPress from another Server via PHP
- calling admin-ajax.php from admin-ajax.php
- Get “HTTP/1.1 406 Not Acceptable” when accesing my website with Delphi Indy Control
- Contactform7: display results from CURL
- Require advice handling a URL redirect from a Third Party. URL Params need to populate and then forward to payment
- WordPress HTTP 500 Error “page isn’t working”
- My WP Website Shows HTTP ERROR 500
- Does WordPress perform better with curl installed?
- Get full page HTML for a non-public WordPress page
- Using the wp_remote_post response body
- rest_cannot_create_user – Sorry, you are not allowed to create new users. CURL WORDPRESS REST API
- cURL External API request displays content above other content on page
- What’s the point in having “www” in a URL?
- For what is the “.well-known”-folder?
- How to make wireshark filter POST-requests only?
- Image file urls still point to http instead of https