{"id":18924387,"url":"https://github.com/outlandishideas/sync","last_synced_at":"2026-02-24T09:32:48.636Z","repository":{"id":8614646,"uuid":"10255846","full_name":"outlandishideas/sync","owner":"outlandishideas","description":"Sync directory contents over HTTP using PHP","archived":false,"fork":false,"pushed_at":"2015-11-09T09:56:37.000Z","size":123,"stargazers_count":57,"open_issues_count":5,"forks_count":13,"subscribers_count":10,"default_branch":"master","last_synced_at":"2026-01-12T16:36:42.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/outlandishideas.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}},"created_at":"2013-05-23T23:47:53.000Z","updated_at":"2025-07-11T06:57:26.000Z","dependencies_parsed_at":"2022-08-26T03:25:16.513Z","dependency_job_id":null,"html_url":"https://github.com/outlandishideas/sync","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/outlandishideas/sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outlandishideas%2Fsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outlandishideas%2Fsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outlandishideas%2Fsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outlandishideas%2Fsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/outlandishideas","download_url":"https://codeload.github.com/outlandishideas/sync/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/outlandishideas%2Fsync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29777882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T04:54:30.205Z","status":"ssl_error","status_checked_at":"2026-02-24T04:53:58.628Z","response_time":75,"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":[],"created_at":"2024-11-08T11:06:40.795Z","updated_at":"2026-02-24T09:32:48.557Z","avatar_url":"https://github.com/outlandishideas.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Sync directory contents over HTTP using PHP\n\nUse these classes to recursively sync the contents of two folders on different servers. The source must have\na web server although the directory being synced does not have to be web accessible. The client initiates the\nconnection and can be either another web server or a command line script.\n\n\n## Install\n\nIf using Composer, add `\"outlandish/sync\":\"1.*@dev\"` to your requirements.\n\nOtherwise, just download and `require` the classes as normal.\n\n\n## How it works\n\n1. Client collects list of existing files in destination folder (and subfolders), with size and modified dates\n2. Client POSTs list to the server\n3. Server gets list of files in source folder on server and compares this with list of files from client\n4. Server returns list of new or modified files present on server\n5. Client requests contents of each new or modified file and saves it to destination folder\n6. Client sets last modified time of file to match server\n\nNo attempt is made to send diffs; this is not rsync. Symlinks are not explicitly supported. All communication\nis via JSON data in the request/response body.\n\n## Example\n\nOn the server, e.g. `example.com/remote.php`:\n\n```php\nrequire_once 'vendor/autoload.php'; //or include AbstractSync.php and Server.php\n\nconst SECRET = '5ecR3t'; //make this long and complicated\nconst PATH = '/path/to/source'; //sync all files and folders below this path\n\n$server = new \\Outlandish\\Sync\\Server(SECRET, PATH);\n$server-\u003erun(); //process the request\n```\n\nOn the client(s):\n\n```php\nrequire_once 'vendor/autoload.php';\n\nconst SECRET = '5ecR3t'; //this must match the secret key on the server\nconst PATH = '/path/to/destination'; //target for files synced from server\n\n$client = new \\Outlandish\\Sync\\Client(SECRET, PATH);\n$client-\u003erun('http://example.com/remote.php'); //connect to server and start sync\n```\n\n## FAQ\n\n### Why not just use rsync?\n\nSometimes you need code to be portable across a range of hosting environments so you can't rely on rsync, scp or \nother external dependencies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutlandishideas%2Fsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foutlandishideas%2Fsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutlandishideas%2Fsync/lists"}