{"id":21730874,"url":"https://github.com/takuya/php-ddns-api-server","last_synced_at":"2026-05-19T02:07:59.696Z","repository":{"id":264495282,"uuid":"893531313","full_name":"takuya/php-ddns-api-server","owner":"takuya","description":"php cloudflare ddns api server by lumen ","archived":false,"fork":false,"pushed_at":"2025-02-21T11:08:29.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T23:28:40.573Z","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/takuya.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":"2024-11-24T17:23:19.000Z","updated_at":"2025-02-21T11:08:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a0eb59e-12ec-4128-83f1-7d8722e6e7ed","html_url":"https://github.com/takuya/php-ddns-api-server","commit_stats":null,"previous_names":["takuya/php-ddns-api-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/takuya/php-ddns-api-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takuya%2Fphp-ddns-api-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takuya%2Fphp-ddns-api-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takuya%2Fphp-ddns-api-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takuya%2Fphp-ddns-api-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/takuya","download_url":"https://codeload.github.com/takuya/php-ddns-api-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/takuya%2Fphp-ddns-api-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263957820,"owners_count":23535604,"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":[],"created_at":"2024-11-26T04:18:34.078Z","updated_at":"2026-05-19T02:07:59.660Z","avatar_url":"https://github.com/takuya.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ddns api \n\ncloudflare を ddns で使うためのセット\n\n\n\n## 使い方\n\ncloudflare の api を通して DNSのAレコードを更新するAPIを呼び出す。\n\n```shell\nHOST=my-ddns.example.tld\ndomain=random.example.tld\nip=1.1.1.1\napp_token=abc # config('app.token')を使う。\n## \ncurl https://${HOST}/ddns/${domain}/${op}?token=${app_token}\n```\n\n## 設定\n\n`.env`を使って設定する。\n```shell\nCF_TOKEN_PATH=storage/credentials/cloudflare_token.json.enc\nAPP_TOKEN=xxxx.xxxx.xxxx\n```\n\nstorage/credentials/cloudflare_token.json\n```json\n[\n  {\n    \"domain\": \"example.tld\",\n    \"key\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n  },\n  {\n    \"domain\": \"example.gtd\",\n    \"key\": \"xxxxxxxxxxxxxxxxxxxxx\"\n  }\n]\n```\n\nファイルを暗号化して保存して使う場合\n\n```shell\ni=$(( 1000* 1000 ))\nfile_in=storage/credentials/cloudflare_token.json\nfile_out=storage/credentials/cloudflare_token.json.enc\npassphrase=\"my_strong_password\"\n\n\nopenssl enc -e -aes-256-cbc \\\n  -pbkdf2 -iter \"${i}\" \\\n  -in \"${file_in}\" -out \"${file_out}\" \\\n  -k \"${passphrase}\"\\\n  -base64 \\\n  ;\n  \n```\n\n```php\n$str = openssl_equivalent_decrypt($token_path, config('app.token'));\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakuya%2Fphp-ddns-api-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftakuya%2Fphp-ddns-api-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftakuya%2Fphp-ddns-api-server/lists"}