{"id":21214289,"url":"https://github.com/goindow/php-curl","last_synced_at":"2025-03-15T00:19:40.603Z","repository":{"id":143903784,"uuid":"127876316","full_name":"goindow/php-curl","owner":"goindow","description":"CurlUtil.php 是对 PHP CURL的封装","archived":false,"fork":false,"pushed_at":"2018-04-03T09:58:50.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-21T16:23:15.367Z","etag":null,"topics":["php-curl"],"latest_commit_sha":null,"homepage":"","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/goindow.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-03T08:29:45.000Z","updated_at":"2021-12-27T09:38:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"c3f3dd32-3073-4f3b-9e6d-75d42081d73a","html_url":"https://github.com/goindow/php-curl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goindow%2Fphp-curl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goindow%2Fphp-curl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goindow%2Fphp-curl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goindow%2Fphp-curl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goindow","download_url":"https://codeload.github.com/goindow/php-curl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243663598,"owners_count":20327310,"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":["php-curl"],"created_at":"2024-11-20T21:27:08.541Z","updated_at":"2025-03-15T00:19:40.575Z","avatar_url":"https://github.com/goindow.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CurlUtil\n\nCurlUtil.php 是对 PHP CURL 的封装。使用单例模式，封装了最常用的 http/https 的 get/post 请求，内置支持 application/x-www-form-urlencoded 及 application/json 数据格式，便利的 header 配置，ssl 链式支持等\n\n## Usage\n\n* Init\n```php\nconst API_URL = '';\n\n$postData = [\n  'page': 1,\n  'size': 15\n  // more data\n];\n\n$curl = CurlUtil::getInstance();\n```\n\n* Get\n```php\n$curl-\u003eget(API_URL);\n```\n\n* Post （formData ）\n```php\n$curl-\u003eget(API_URL);\n```\n\n* Post （jsonData）\n```php\n$curl-\u003epost(API_URL, $postData, true);\n```\n\n* Https\n```php\n$curl-\u003essl()-\u003eget(API_URL);\n$curl-\u003essl()-\u003epost(API_URL, $formData);\n$curl-\u003essl()-\u003epost(API_URL, $postData, true);\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoindow%2Fphp-curl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoindow%2Fphp-curl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoindow%2Fphp-curl/lists"}