{"id":22048947,"url":"https://github.com/schnoog/php_github_updater","last_synced_at":"2026-04-19T04:34:47.130Z","repository":{"id":45305166,"uuid":"303400119","full_name":"schnoog/php_github_updater","owner":"schnoog","description":"A small script with the aim to update a local php app installation from GitHub without any Releases (file by file)","archived":false,"fork":false,"pushed_at":"2021-12-22T20:17:55.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T09:45:24.122Z","etag":null,"topics":["autoupdate","autoupdater","checksums","clientless","git-object-hash","github","php","update","updater"],"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/schnoog.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":"SECURITY.md","support":null}},"created_at":"2020-10-12T13:26:03.000Z","updated_at":"2021-12-22T20:17:58.000Z","dependencies_parsed_at":"2022-08-04T13:30:31.972Z","dependency_job_id":null,"html_url":"https://github.com/schnoog/php_github_updater","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/schnoog/php_github_updater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schnoog%2Fphp_github_updater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schnoog%2Fphp_github_updater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schnoog%2Fphp_github_updater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schnoog%2Fphp_github_updater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schnoog","download_url":"https://codeload.github.com/schnoog/php_github_updater/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schnoog%2Fphp_github_updater/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260034508,"owners_count":22949074,"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":["autoupdate","autoupdater","checksums","clientless","git-object-hash","github","php","update","updater"],"created_at":"2024-11-30T14:13:53.803Z","updated_at":"2026-04-19T04:34:42.089Z","avatar_url":"https://github.com/schnoog.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php_github_updater\nA small script with the aim to update a local php app installation from GitHub without special needs\n(easy to install, configure, integrate or run stand alone)\n\n## Installation and configuration\nIt's really easy, all you need to do is:\n * Place the script in the root directory of the project (if it's cloned the directory where .git is located)\n\nAdjust the following settings according to your demands\n * `$user` the repository owner\n * `$repo` name of the repository\n * `$branch` name of the branch. If no value is set (\"\") the script will determine the default branch at Github\n * `$do_update` to `true` if available updates should be installed, otherwise chose `false` (only relevant to manual usage)\n * `$target_directory`  directory with the files to update (if the script is in the main project path `__DIR__` will do the trick)\n * `$write_output` Defines if the current progress is written in the file `$write_output_file` (`true` or `false`)\n * `$write_output_file` Filename of the progress file\n * `$usage_password` Password for update when using the own gui\n * `$capture_requests` Defines if the `$_REQUEST` will be parsed (`true` or `false`) required when own gui is used\n * `$use_own_gui` Defines is the own gui will be used (`true` or `false`)\n * `$github_account['user']` Your github user account login name(most likely not needed)\n * `$github_account['pass']` Your github user account password(most likely not needed)\n (You can also copy rename the file ``mygitpw.php.dist` to  `mygitpw.php` and adjust the values within it)\n\nGitHub limits the unauthorized requests to 60 per hour, afterwards you'll get blocked\nFor develeopment reasons it's proposed to set the `$github_account` variables to fit your GitHub account data\n\n## Direct Usage ($use_own_gui = false)\nSimply visit the `gitupdater.php` in your installation with your browser\nIf `$do_update` is set to `true` the updates will applied and a message displayed.\nOtherwise only the message will be shown.\n\n## GUI usage ($use_own_gui = true)\nSimply visit the page and you'll see a small website offering you the options to\neither only check for updates or applying them\nIf you defined a password `$usage_password`  this will be required to perform the actions\nIf `$write_output_file` is defined and `$write_output` is `true` the current state of the action will be displayed (and refreshed every second)\n\n### How it works\nThe script captures a list of commits from api.github.com\n * It will than start with the newest commit and caputure the checksums of the files changed\n * If the checksums of at least one file from the commit doesn't match with the one of the local available file,\n * the file will be added to the list and the next (older) commit will be inspected and so on.\n\nThis will end as soon as all files of a commit match with the local versions (Version A) or all commits supplied by the api query have unmet files (Version B).\n\nIf files need to be updatd, the script will (provided $do_update is set to true )\n * Version A: Copy each single file from github and replaces the local version\n * Version B: Download the master.zip from the Github repository and unzip it in the directory\n \n\n--a Schnoog project--","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschnoog%2Fphp_github_updater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschnoog%2Fphp_github_updater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschnoog%2Fphp_github_updater/lists"}