Create a simple script that takes a list of URLs as input and checks whether each URL is online (status code 200) or offline. The script should print the URL along with its HTTP status code.
Expected Behavior
- Input: a text file with one URL per line
- Output: print each URL with its status code
- If a URL is unreachable, display an error message instead of crashing
Example Usage
python urlcheck.py -l urls.txt