{"id":28474228,"url":"https://github.com/athlon1600/php-curl-client","last_synced_at":"2025-07-01T10:32:30.703Z","repository":{"id":44762288,"uuid":"232980171","full_name":"Athlon1600/php-curl-client","owner":"Athlon1600","description":"A very simple curl client - less than 100 lines. Perfect for being a base class.","archived":false,"fork":false,"pushed_at":"2023-10-24T23:24:02.000Z","size":28,"stargazers_count":13,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-07T13:06:27.901Z","etag":null,"topics":["curl","ext-curl","php-curl","php-curl-library"],"latest_commit_sha":null,"homepage":"https://www.proxynova.com/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Athlon1600.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-01-10T06:22:49.000Z","updated_at":"2023-10-28T17:51:34.000Z","dependencies_parsed_at":"2022-09-09T23:41:51.884Z","dependency_job_id":"bdc7d69a-4760-4f83-bb08-0898eeb57b19","html_url":"https://github.com/Athlon1600/php-curl-client","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"c4c2d8869f25b9da7bda74ff41b29a4ec2f51e79"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Athlon1600/php-curl-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Athlon1600%2Fphp-curl-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Athlon1600%2Fphp-curl-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Athlon1600%2Fphp-curl-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Athlon1600%2Fphp-curl-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Athlon1600","download_url":"https://codeload.github.com/Athlon1600/php-curl-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Athlon1600%2Fphp-curl-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262944250,"owners_count":23388721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["curl","ext-curl","php-curl","php-curl-library"],"created_at":"2025-06-07T13:06:28.158Z","updated_at":"2025-07-01T10:32:30.693Z","avatar_url":"https://github.com/Athlon1600.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/Athlon1600/php-curl-client/ci.yml)\n![](https://img.shields.io/github/last-commit/Athlon1600/php-curl-client.svg)\n![Packagist Downloads (custom server)](https://img.shields.io/packagist/dm/Athlon1600/php-curl-client)\n\n# PHP Curl Client\n\nA very simple curl client - less than 100 lines. Perfect for being a base class.\n\n## Installation\n\n```bash\ncomposer require athlon1600/php-curl-client \"^1.0\"\n```\n\n## Examples\n\n```php\nuse Curl\\Client;\n\n$client = new Client();\n\n// returns standardized Response object no matter what\n$response = $client-\u003eget('https://stackoverflow.com');\n\n// 200\n$status = $response-\u003estatus;\n\n// HTML content\n$body = $response-\u003ebody;\n\n// curl_error() OR null\n$error = $response-\u003eerror;\n\n// CurlInfo instance\n$info = $response-\u003einfo;\n```\n\n**Update:** `$response-\u003einfo` now returns an object that will have an auto-complete on your IDE.\n\n![](http://g.recordit.co/svt7mzJwsU.gif);\n\n\nWorks with POST requests too:\n\n```php\n$client-\u003epost('http://httpbin.org/post', ['username' =\u003e 'bob', 'password' =\u003e 'test']);\n```\n\nor you can issue a completely customized request:\n\n```php\n$client-\u003erequest('GET', 'https://www.whatismyip.com/', null, [\n    'User-Agent' =\u003e 'Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X)'\n], [\n    CURLOPT_PROXY =\u003e '127.0.0.1:8080',\n    CURLOPT_TIMEOUT =\u003e 10\n]);\n```\n\n## TODO\n\n- make PSR-7 and PSR-18 compatible\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathlon1600%2Fphp-curl-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fathlon1600%2Fphp-curl-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathlon1600%2Fphp-curl-client/lists"}