{"id":13828665,"url":"https://github.com/xPaw/Crimp.php","last_synced_at":"2025-07-09T06:32:34.532Z","repository":{"id":57084884,"uuid":"58038683","full_name":"xPaw/Crimp.php","owner":"xPaw","description":"⚡ A simple multi curl implementation, optimized for high concurrency.","archived":false,"fork":false,"pushed_at":"2023-04-12T11:06:21.000Z","size":30,"stargazers_count":25,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-15T14:24:32.430Z","etag":null,"topics":["concurrency","curl","multi-threading","php"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/xpaw/crimp","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/xPaw.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}},"created_at":"2016-05-04T09:12:32.000Z","updated_at":"2023-03-27T07:42:04.000Z","dependencies_parsed_at":"2024-01-28T01:07:20.927Z","dependency_job_id":"f3b6276b-af36-4387-97f2-b858db20038b","html_url":"https://github.com/xPaw/Crimp.php","commit_stats":{"total_commits":44,"total_committers":2,"mean_commits":22.0,"dds":"0.045454545454545414","last_synced_commit":"0712685a5ee991b249f1fdc15468706f20ffbba3"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xPaw%2FCrimp.php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xPaw%2FCrimp.php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xPaw%2FCrimp.php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xPaw%2FCrimp.php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xPaw","download_url":"https://codeload.github.com/xPaw/Crimp.php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225492420,"owners_count":17482869,"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":["concurrency","curl","multi-threading","php"],"created_at":"2024-08-04T09:02:58.039Z","updated_at":"2024-11-20T08:30:57.200Z","avatar_url":"https://github.com/xPaw.png","language":"PHP","readme":"# Crimp [![Packagist](https://img.shields.io/packagist/dt/xpaw/crimp.svg)](https://packagist.org/packages/xpaw/crimp)\n\nA simple multi curl implementation, optimized for high concurrency.\n\nThis is practically a bare bones implemention.\nRetrying, HTTP code checking and other stuff is up to the user.\n\nUsage:\n\n```php\n$Crimp = new Crimp( function( CurlHandle $Handle, string $Data, $Request ) : void\n{\n\t// $Handle is the cURL handle\n\t// $Data is the content of a cURL handle\n\t// $Request is whatever was queued\n} );\n\n// How many concurrent threads to use\n$Crimp-\u003eThreads = 10;\n\n// Set any curl option that are needed\n$Crimp-\u003eCurlOptions[ CURLOPT_FOLLOWLOCATION ] = 1;\n\n// Queue urls\n$Crimp-\u003eAdd( 'https://example.com/?v=1' );\n$Crimp-\u003eAdd( 'https://example.com/?v=2' );\n\n// Queue an array, it must contain a `Url` key\n$Crimp-\u003eAdd( [ 'Url' =\u003e 'https://example.com/?v=3' ] );\n\n// Queue an object, it must contain a `Url` property\nclass RequestUrl { public string $Url; }\n$request = new RequestUrl();\n$request-\u003eUrl = 'https://example.com/?v=4';\n$Crimp-\u003eAdd( $request );\n\n// Execute the requests\n$Crimp-\u003eGo();\n```\n\n`CURLOPT_RETURNTRANSFER` is enabled by default. See [examples](examples/) folder for more.\n\nIf you need a fully featured multi cURL implemention, take a look at\n[Zebra_cURL](https://github.com/stefangabos/Zebra_cURL) or [Guzzle](https://github.com/guzzle/guzzle) instead.\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FxPaw%2FCrimp.php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FxPaw%2FCrimp.php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FxPaw%2FCrimp.php/lists"}