Advertisement
Ajwct

Website Down Detector

Feb 9th, 2024
1,259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.32 KB | None | 0 0
  1. import os
  2.  
  3. def check_website_reachable(website):
  4.     response = os.system("ping " + website)
  5.     if response == 0:
  6.         print(website + " is reachable.")
  7.     else:
  8.         print(website + " is not reachable.")
  9.  
  10. # Example usage
  11. website = input("Enter the website URL to check: ")
  12. check_website_reachable(website)
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement