{"id":15827827,"url":"https://github.com/atomjoy/curlsendfile","last_synced_at":"2026-04-15T21:30:58.196Z","repository":{"id":235188462,"uuid":"229441716","full_name":"atomjoy/CurlSendFile","owner":"atomjoy","description":"Php curl upload class.","archived":false,"fork":false,"pushed_at":"2024-04-22T15:06:06.000Z","size":73,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-12T10:31:43.696Z","etag":null,"topics":["curl","php","php-curl","php-oop","php7","post","upload","upload-images"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atomjoy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-12-21T14:50:00.000Z","updated_at":"2024-04-22T15:06:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd2956e6-19b4-4564-a962-ff22e4fcf045","html_url":"https://github.com/atomjoy/CurlSendFile","commit_stats":{"total_commits":53,"total_committers":4,"mean_commits":13.25,"dds":0.3584905660377359,"last_synced_commit":"25d85254a4263dd78fd5aca8af3d6efb81249756"},"previous_names":["moovspace/curlsendfile"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/atomjoy/CurlSendFile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjoy%2FCurlSendFile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjoy%2FCurlSendFile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjoy%2FCurlSendFile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjoy%2FCurlSendFile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atomjoy","download_url":"https://codeload.github.com/atomjoy/CurlSendFile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomjoy%2FCurlSendFile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004906,"owners_count":26083802,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","php","php-curl","php-oop","php7","post","upload","upload-images"],"created_at":"2024-10-05T10:09:33.691Z","updated_at":"2025-10-10T18:05:51.710Z","avatar_url":"https://github.com/atomjoy.png","language":"PHP","readme":"# CurlSendFile Php class\nSend big files with php curl\n\n### Set php.ini\n```bash\n# In php.ini only\nfile_uploads = On\nallow_url_fopen = Off\nallow_url_include = Off\n\n# In php.ini or in .user.ini in local directory\nmax_execution_time = 40000\n\nmax_input_time = 40000\nmax_input_vars = 100\n\nupload_max_filesize = 900M\npost_max_size = 900M\n```\n### Send file with curl\n```php\n\u003c?php\n// Limits\nset_time_limit(0);\nini_set('memory_limit', -1);\n\n// Errors\nini_set('display_errors', 1);\nini_set('display_startup_errors', 1);\nerror_reporting(E_ALL \u0026 ~E_NOTICE \u0026 ~E_WARNING);\n\n// Import class with composer\nrequire('vendor/autoload.php');\nuse PhpCurl\\CurlSendFile;\nuse \\Exception;\n\n// Start session if needed\n// session_start();\n\ntry\n{\n    // Create object\n    $curl = new CurlSendFile();\n    \n    // Send single file and post array\n    echo $curl-\u003eSend(\"http://localhost/example/upload.php\", 'example/img/wolf.jpg', ['my_post_id' =\u003e '1234567890', 'name' =\u003e 'Curl upload']);\n    \n    // Params\n    $timeout = 60; // Timeout default: 60\n    $selfsigned = 1; // Allow selfsigned ssl 1 or 0 default: 1\n    $attr = 'my_file'; // Files form name $_FILES['my_file'] default: file\n    \n    // Send with custom field name\n    echo $curl-\u003eSend(\"https://localhost/example/upload.php\", 'example/img/wolf.jpg', ['id'=\u003e'1234567890'], $timeout, $selfsigned, $attr);\n}\ncatch(Exception $e)\n{\n    echo $e-\u003egetMessage();\n    echo $e-\u003egetCode();\n}\n?\u003e\n```\n\n### Composer require\nInstall from command line (not active)\n```bash\n# Add\ncomposer require atomjoy/curlsendfile\n\n# Or\ncomposer require atomjoy/curlsendfile:1.0\ncomposer require atomjoy/curlsendfile:stable\n\n# Install, update\ncomposer update\n\n# If you need to update the autoloader\ncomposer dump-autoload -o\n```\n\nInstall library from composer.json\n```json\n{\n    \"name\": \"acme/blog\",\n    \"repositories\": [\n        {\n            \"type\": \"vcs\",\n            \"url\": \"https://github.com/atomjoy/curlsendfile\"\n        }\n    ],\n    \"require\": {\n        \"atomjoy/curlsendfile\": \"~1.0\"\n    }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomjoy%2Fcurlsendfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatomjoy%2Fcurlsendfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomjoy%2Fcurlsendfile/lists"}