Page 1 of 1

api changing dynamic ip address (A - ip dynamyc)

Posted: Mon 30. Jan 2023, 22:23
by webGeorg
Hello.
Please tell me how to use the api to implement the ip address change (dynamic)
Home server - local network, Cyrillic domain
I'm not good at code :oops:
Thoughts:
Getting a public ip address
<?php
$ip = file_get_contents('https://api.ipify.org');
?>
code api
"records": {
"soa": {
"ttl": 86400,
"primary_ns": "ns.example.com.", --------------- domain название.бел cyrillic ?
"rname": "root.example.com.",
...........................................................
other": [
{
"host": "@",
"ttl": 86400,
"type": "A",
"value": "192.168.178.1" -------------------------- $ip code php?
Help me. Thanks.