check if urls work

Do you have a list of urls (one per line) and you do not want to check them by hand? Then try this code. It will open g1.txt (the file with your urls), then it checks every line. The urls that do work will be stored in g2.txt. The sites that do not work will get stored in g3.txt. Be aware: sites that forward the user are stored in g3.txt, too.