Skip to content
a example project using michaelesmith/dyndns-kit
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
phpdocker
public
var
.env.dist
.gitignore
README.md
composer.json
composer.lock
docker-compose.yml

README.md

What is this?

This is an example application to show how michaelesmith/dyndns-kit can be used.

Install

composer create-project "michaelesmith/dyndns-example" mydyndns

Setup

This example application makes use of the symfony/dotenv library to load parameters but you could use anything. It will try to load a .env file in the project root dir if one exists otherwise it will load the included .env.dist. If you want to override values just copy .env.dist to .env and make any changes / additions. If you want to uncomment the advanced example you will need to insert your Digital Ocean API token in the .env or hard code it.

Running it

This repository also includes a simple docker compose file (generated by the awesome PHPDocker.io) to allow you to play with this project with a minimum of effort. If you want to test it out with docker just docker-copose up -d

If you want use this without docker you will need to configure your webserver to serve the /public/index.php file. For an example you can see the config used by Nginx through docker at phpdocker/nginx/nginx.conf.

Try it out

Example curl command

curl "testuser:s3cret@localhost:9001/nic/update?hostname=test.example.com&myip=127.0.0.1"

Example with multiple hosts

curl "testuser:s3cret@localhost:9001/nic/update?hostname=test1.example.com,test2.example.com&myip=127.0.0.1"

Example without IP (if no IP is given the client IP address will be used)

curl "testuser:s3cret@localhost:9001/nic/update?hostname=test.example.com"

You can’t perform that action at this time.