Snippets tagged “curl”
36 snippets use this tag.
- Call to undefined function curl_init() even it is enabled in php7PHP
The error message "Call to undefined function curl_init()" typically indicates that the cURL extension for PHP is not installed or is not enabled.
- Can't connect to HTTPS site using cURL. Returns 0 length content instead. What can I do?PHP
There are several possible reasons why cURL is returning a 0 length response when trying to connect to an HTTPS site.
- Compiling php with curl, where is curl installed?PHP
The location of the curl installation depends on the operating system and the method used to install it.
- CURL and HTTPS, "Cannot resolve host"PHP
It sounds like you are trying to use curl to make a request to an HTTPS url and are encountering an error that says "Cannot resolve host." This error can occur for a few reasons:
- Curl and PHP - how can I pass a json through curl by PUT,POST,GETPHP
To pass a JSON object through cURL using the PUT method, you can use the following command:
- curl error 18 - transfer closed with outstanding read data remainingPHP
Error 18 means that the transfer was closed with outstanding read data remaining.
- Curl error 60, SSL certificate issue: self signed certificate in certificate chainPHP
This error message appears when curl is unable to verify the SSL/TLS certificate presented by the server.
- CURL ERROR: Recv failure: Connection reset by peer - PHP CurlPHP
This error is usually caused by a network issue, such as a lost connection or a network timeout.
- curl POST format for CURLOPT_POSTFIELDSPHP
To make a POST request with PHP's cURL functions, you can use the CURLOPT_POST option to send POST data.
- curl posting with header application/x-www-form-urlencodedPHP
To make a POST request using curl and include a header of Content-Type: application/x-www-form-urlencoded, you can use the following command:
- Downloading a large file using curlPHP
To download a large file using curl, use the following command:
- Downloading Java JDK on Linux via wget is shown license page insteadJava
If you are trying to download the Java Development Kit (JDK) on Linux using wget and you are being shown the license page instead of the JDK download, it is likely because the download page has changed since the wget command was written.
- Get all photos from Instagram which have a specific hashtag with PHPPHP
To get all photos from Instagram that have a specific hashtag with PHP, you can use the Instagram API.
- Get latitude and longitude automatically using php, APIPHP
To get latitude and longitude automatically using PHP, you can use an API (Application Programming Interface) such as Google Maps API, OpenCage Geocoding API, or GeoCode.io API.
- How to enable cURL in PHP / XAMPPPHP
To enable cURL in PHP, you need to make sure that the cURL extension is enabled in your PHP configuration.
- How to get file_get_contents() to work with HTTPS?PHP
To get file_get_contents() to work with HTTPS, you may need to make sure that PHP has been compiled with the OpenSSL extension.
- How to get info on sent PHP curl requestPHP
To get information about a cURL request that you have sent using PHP, you can use the curl_getinfo() function.
- How to get page content using cURL?PHP
To get the content of a webpage using cURL, you can use the following command:
- How to include Authorization header in cURL POST HTTP Request in PHP?PHP
To include the Authorization header in a cURL POST request in PHP, you can use the CURLOPT_HTTPHEADER option and pass it an array of headers like this:
- How to install PHP composer inside a docker containerPHP
To install PHP Composer inside a Docker container, you will need to do the following:
- How to send a GET request from PHP?PHP
To send a GET request from PHP, you can use the file_get_contents function or the cURL extension.
- How to Send a Post Request with PHPPHP
In this snippet, we will share with you the most flexible and powerful ways of sending post requests with the help of PHP. Just check out the examples.
- How to send HTTPS posts using phpPHP
To send an HTTPS POST request using PHP, you can use the curl extension.
- How to upload a file and JSON data in Postman?Java
To upload a file and JSON data in Postman, you can follow these steps:
- how to upload file using curl with PHPPHP
To upload a file using cURL in PHP, you can use the curl_setopt function to specify the CURLOPT_POSTFIELDS option with the file data.
- How to use wget in php?PHP
You can use the exec function in PHP to execute the wget command.
- PHP CURL DELETE requestPHP
To send a DELETE request with PHP using cURL, you can use the following code:
- PHP cURL how to add the User Agent value OR overcome the Servers blocking cURL requests?PHP
You can add a custom User Agent value to a cURL request in PHP using the CURLOPT_USERAGENT option.
- PHP cURL HTTP CODE return 0PHP
If cURL is returning a HTTP code of 0, it usually indicates that cURL was unable to communicate with the server.
- PHP cURL HTTP PUTPHP
To make an HTTP PUT request using PHP's cURL functions, you can use the following snippet:
- PHP Fatal error: Call to undefined function curl_init()PHP
This error message indicates that the PHP script is trying to use the cURL library, which is not installed or enabled on the server.
- PHP's file_exists() will not work for me?PHP
The file_exists() function in PHP can be used to check if a file exists on the file system.
- Post Requests with cURLPHP
cURL is applied for making requests with different protocols. A post request can send user collected data to a server. Find out how to do that accurately.
- Save image from url with curl PHPPHP
To save an image from a URL using PHP and cURL, you can use the following function:
- Use cURL with SNI (Server Name Indication)PHP
Server Name Indication (SNI) is an extension to the Transport Layer Security (TLS) protocol that allows a client to specify the hostname it is trying to connect to at the start of the handshaking process.
- What's the net::ERR_HTTP2_PROTOCOL_ERROR about?PHP
net::ERR_HTTP2_PROTOCOL_ERROR is an error that occurs in the Google Chrome browser when there is an issue with the HTTP/2 protocol.