zero-to-prod / curl-helper-sdk
A Curl Help Software Development Kit.
Fund package maintenance!
Github
Requires
- php: >=8.1
- zero-to-prod/curl-helper: ^1.0
- zero-to-prod/data-model: ^81.9
- zero-to-prod/transformable: ^71.0
Requires (Dev)
README
Contents
Introduction
A Curl Help Software Development Kit.
Requirements
- PHP 7.1 or higher.
Installation
Install Zerotoprod\CurlHelperSdk
via Composer:
composer require zero-to-prod/curl-helper-sdk
This will add the package to your project’s dependencies and create an autoloader entry for it.
Usage
parseHeaders
Parse curl headers:
use Zerotoprod\CurlHelperSdk\CurlHelperSdk; $CurlHandle = curl_init('https://google.com'); curl_setopt_array($CurlHandle, [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => true, ]); $response = curl_exec($CurlHandle); $header_size = curl_getinfo($CurlHandle, CURLINFO_HEADER_SIZE); curl_close($CurlHandle); $headers = CurlHelperSdk::parseHeaders($curl_response, $header_size)
Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page if you want to contribute.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.