i need to attempt to make a connection to a domain to determine whether a specific server is online
i have tried to use socket to create a connection but it never makes a connection even though the domain is online
import socket
def ConnectionTest():
domain = "www.something.com/uptimecheck"
try:
socket.create_connection((domain, 443))
return True
except OSError:
pass
return False
even when i know the domain is online the connection test always returns False, when in theory it should return true.
what am i doing wrong here?