Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chijete/crafyasynchttp
Simple unidirectional Asynchronous CURL PHP library
https://github.com/chijete/crafyasynchttp
async async-curl async-php asynchronous asynchronous-curl asynchronous-php asynchronous-php-server asynchronous-tasks curl curl-library curl-utility linux-php php windows-php
Last synced: 6 days ago
JSON representation
Simple unidirectional Asynchronous CURL PHP library
- Host: GitHub
- URL: https://github.com/chijete/crafyasynchttp
- Owner: chijete
- License: mit
- Created: 2023-11-17T08:03:11.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-11-29T00:52:30.000Z (12 months ago)
- Last Synced: 2023-11-29T01:40:46.452Z (12 months ago)
- Topics: async, async-curl, async-php, asynchronous, asynchronous-curl, asynchronous-php, asynchronous-php-server, asynchronous-tasks, curl, curl-library, curl-utility, linux-php, php, windows-php
- Language: PHP
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CrafyAsyncHttp
Simple unidirectional Asynchronous CURL PHP libraryThis library works on Windows and Linux (Unix).
It is unidirectional: the HTTP request is sent asynchronously, without waiting for the response from the destination server.
## Requirements
- CURL Library.
- Access to exec() and popen() functions.## Files
- class.php contains the class.
- index.php contains an example.## Principal class (CrafyAsyncHttp) methods
### __construct
Parameters:
- `$temp_files_path` Absolute path to folder for temporal files (example "/usr/local/crafy_temp_files/")
### makeAsyncCurl
Parameters:
- `$url` Equivalent to curl_setopt($ch, CURLOPT_URL, {this}) (HTTP request target URL).
- `$custom_options` Equivalent to curl_setopt($ch, {$custom_options->key}, {$custom_options->value}) (CURL Options as associative array).
- `$time_limit` Temporal PHP file execution time limit (Default 0: unlimited).