import requests
from datetime import datetime

# Diafaan SMS Server settings
server_url = "http://192.168.1.138:9710/http/send-message"
username = "admin"   # adjust if you changed it
password = ""   # adjust if you changed it
phone_number = "+420775735276"

for i in range(1, 11):
    timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    message_text = f"{i}/10 {timestamp}"
    params = {
        "username": username,
        "password": password,
        "to": phone_number,
        "message": message_text
    }
    try:
        response = requests.get(server_url, params=params)
        print(f"Sent '{message_text}': {response.text}")
    except Exception as e:
        print(f"Error sending {message_text}: {e}")
