{"id":42787389,"url":"https://github.com/tofex/curl-ftp","last_synced_at":"2026-01-29T23:14:37.465Z","repository":{"id":57675703,"uuid":"484061195","full_name":"tofex/curl-ftp","owner":"tofex","description":"FTP Client using Curl","archived":false,"fork":false,"pushed_at":"2024-11-26T08:43:02.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-12T18:25:16.764Z","etag":null,"topics":["curl","ftp","ftps"],"latest_commit_sha":null,"homepage":"https://www.tofex.de","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/tofex.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}},"created_at":"2022-04-21T13:24:36.000Z","updated_at":"2024-11-26T08:43:05.000Z","dependencies_parsed_at":"2022-09-26T20:41:39.665Z","dependency_job_id":null,"html_url":"https://github.com/tofex/curl-ftp","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/tofex/curl-ftp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tofex%2Fcurl-ftp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tofex%2Fcurl-ftp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tofex%2Fcurl-ftp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tofex%2Fcurl-ftp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tofex","download_url":"https://codeload.github.com/tofex/curl-ftp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tofex%2Fcurl-ftp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28889868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T21:06:44.224Z","status":"ssl_error","status_checked_at":"2026-01-29T21:06:42.160Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","ftp","ftps"],"created_at":"2026-01-29T23:14:36.732Z","updated_at":"2026-01-29T23:14:37.459Z","avatar_url":"https://github.com/tofex.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# curl-ftp\n\nTofex Curl FTP provides a client based on Curl.\n\n## Installation\n\n```bash\n$ composer require tofex/curl-ftp\n```\n\n## License\n\nTofex Curl FTP is licensed under the MIT License - see the LICENSE file for details.\n\n## Usage\n\n### Creating a connection\n\n```php\n$ftp = new Client();\n$ftp-\u003eopen([\n    'host' =\u003e 'ftp.example.com',\n    'user' =\u003e 'username',\n    'password' =\u003e 'password',\n    'port' =\u003e 990,\n    'ssl' =\u003e true,\n    'passive' =\u003e true,\n    'timeout' =\u003e 30\n]);\n```\n\nAlternatively you can create a connection using the `connect()` method\n\n```php\n$ftp-\u003econnect($hostName, $port, $userName, $password, $useSsl, $usePassiveMode, $timeout);\n```\n\n### Listing files\n\n```php\n$files = $ftp-\u003els();\n\nprint_r($files);\n```\n\nproduces\n\n```text\nArray\n(\n    [0] =\u003e Array\n        (\n            [text] =\u003e file_1.zip\n            [id] =\u003e /file_1.zip\n        )\n\n    [1] =\u003e Array\n        (\n            [text] =\u003e file_2.zip\n            [id] =\u003e /file_2.zip\n        )\n)\n```\n\n### Setting/changing current directory\n\n```php\n$ftp-\u003ecd('directory/subdirectory');\n```\n\n### Read file contents\n\n```php\n$contents = $ftp-\u003eread('path/to/file.zip');\n```\n\n### Write to file\n\n```php\n$contents = 'file contents';\n$ftp-\u003ewrite('path/to/file.txt', $contents);\n```\n\n### Remove a file/directory\n```php\n$ftp-\u003erm('path/to/file.txt');\n```\n\n### Catching errors\n\nAll exceptions are thrown as standard `Exception` classes with the following message format:\n\n```text\nCould not handle content in path: {path} ({cURL error number})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftofex%2Fcurl-ftp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftofex%2Fcurl-ftp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftofex%2Fcurl-ftp/lists"}