import requests


def send_data_to_ips(data, ip_list):
    for ip in ip_list:
        try:
            url = f"{ip}/API/"
            response = requests.post(url, json=data)
            print(f"Data sent to {ip}: {response.status_code}")
        except Exception as e:
            print(f"Error sending data to {ip}: {e}")
