Net::DynDNS::GoDaddy - Provides Dynamic DNS functionality for your GoDaddy domains
use Net::DynDNS::GoDaddy; use Addr::MyIP; my $hostname = 'home'; my $domain = 'example.com'; my $current_host_ip = host_ip_get($host, $domain); my $my_ip = myip(); if ($current_host_ip ne $my_ip) { host_ip_set($host, $domain, $my_ip); }
For end-users, see the documentation for the update-ip binary.
Provides an interface to allow dynamically updating your GoDaddy domain's DNS name to IP mapping.
You must have a ~/godaddy_api.json file containing your GoDaddy API key and secret, in the following format:
~/godaddy_api.json
{ "api_key": "KEY DATA", "api_secret": "API SECRET" }
The update-ip binary binary will do this for you automatically on first run.
Returns the currently set IP address of the DNS A record for the host/domain pair.
Parameters:
$host
Mandatory, String: The name of the host, eg. www.
www
$domain
Mandatory, String: The name of the domain, eg. example.com.
example.com
Returns: String, the IP address that's currently set for the record.
Updates the DNS A record for the host/domain pair.
$ip
Mandatory, String: The IP address to set the record to eg. 192.168.10.10.
192.168.10.10
Returns: Bool, 1 on success, 0 on failure.
1
0
Fetch your GoDaddy API key and secret from the previously created godaddy_api.json in your home directory.
godaddy_api.json
Not exported by default, use the qw(:all) tag to access it.
qw(:all)
Croaks if the file can't be read.
Returns: A list of two scalars, the API key and the API secret.
Creates the godaddy_api.json file in your home directory that contains your GoDaddy API key and secret.
$key
Mandatory, String: Your GoDaddy API key
$secret
Mandatory, String: Your GoDaddy API secret
Returns: 1 upon success.
Steve Bertrand, <steveb at cpan.org>
<steveb at cpan.org>
Copyright 2022 Steve Bertrand.
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:
http://www.perlfoundation.org/artistic_license_2_0
To install Net::DynDNS::GoDaddy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::DynDNS::GoDaddy
CPAN shell
perl -MCPAN -e shell install Net::DynDNS::GoDaddy
For more information on module installation, please visit the detailed CPAN module installation guide.