This is an example application to show how michaelesmith/dyndns-kit can be used.
composer create-project "michaelesmith/dyndns-example" mydyndns
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.
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.
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"