diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..30cf57e
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,10 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Ignored default folder with query files
+/queries/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/Hostinger-DDNS.iml b/.idea/Hostinger-DDNS.iml
new file mode 100644
index 0000000..625c060
--- /dev/null
+++ b/.idea/Hostinger-DDNS.iml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..105ce2d
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..cf0df80
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..71fad2d
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..b0c4cd5
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,13 @@
+FROM python:3.14-slim
+
+WORKDIR /app
+
+# Install dependencies
+COPY requirements.txt .
+RUN pip install --no-cache-dir -r requirements.txt
+
+# Copy script
+COPY main.py .
+
+# Run script
+CMD ["python", "main.py"]
\ No newline at end of file
diff --git a/main.py b/main.py
new file mode 100644
index 0000000..f2f6ffe
--- /dev/null
+++ b/main.py
@@ -0,0 +1,61 @@
+import requests, os, time
+from dotenv import load_dotenv
+
+
+while True:
+ load_dotenv()
+
+ #Enviroment variables.
+ DOMAIN = os.getenv("DOMAIN")
+ SUBDOMAIN = os.getenv("SUBDOMAIN")
+ DNS_RECORD_TYPE = os.getenv("DNS_RECORD_TYPE")
+ TOKEN = os.getenv("TOKEN")
+
+ #Internal variables.
+ public_ip = requests.get("https://api.ipify.org/").text.strip() #The public IP of the container.
+ dns_ip = None #The current IP of the DNS record, unpopulated.
+
+ #Set the proper headers.
+ headers = {
+ "Authorization": f"Bearer {TOKEN}",
+ "Content-Type": "application/json"
+ }
+
+ #Get the zone using the token and domain.
+ zone = (requests.get(
+ f"https://developers.hostinger.com/api/dns/v1/zones/{DOMAIN}",
+ headers=headers).json())
+
+ #Get the current DNS record, and set it to the dns_ip variable.
+ for record in zone:
+ if record["name"] == SUBDOMAIN and record["type"] == DNS_RECORD_TYPE:
+ dns_ip = record["records"][0]["content"]
+
+ if dns_ip == public_ip:
+ #No action needed.
+ print("Values are the same, no need to update DNS record.")
+ elif dns_ip != public_ip:
+ #Step 1: Notify the user that the value is different.
+ print("DNS record is different, modifying DNS record...")
+ print("Current DNS value is:", dns_ip)
+
+ #Step 2: Set the value to the new public IP.
+ for record in zone:
+ if record["name"] == SUBDOMAIN and record["type"] == DNS_RECORD_TYPE:
+ if record.get("records"):
+ record["records"][0]["content"] = public_ip
+
+ print("Updated DNS value will be:", public_ip)
+
+ #Step 3: Push the value to Hostinger.
+ response = requests.put(
+ f"https://developers.hostinger.com/api/dns/v1/zones/{DOMAIN}",
+ headers=headers,
+ json={"zone": zone}
+ )
+
+ #Step 4: Notify the user of the status of the response.
+ print("Status code:", response.status_code)
+ print("Response:", response.text)
+
+ time.sleep(300)
\ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..d44fe44
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,2 @@
+requests
+python-dotenv
\ No newline at end of file