Skip to content

Instantly share code, notes, and snippets.

View talalashraf's full-sized avatar

Talal Ashraf talalashraf

View GitHub Profile
@talalashraf
talalashraf / update.py
Created April 13, 2023 15:50
Update DNS with Fresh IP in Python
import time
import requests
import json
# Define your Cloudflare API credentials and zone details
api_key = "YOUR_API_KEY"
email = "YOUR_EMAIL"
zone_id = "YOUR_ZONE_ID"
dns_record_name = "YOUR_DNS_RECORD_NAME"