I have some suggestions for improving the program performance:
1. If you need not URL title, all informations can be gotten from response head, then we can use HTTP HEAD request to check url status replacing HTTP GET request. It will be faster because it will not download these URL contents.
2. If all links have same hostname, a keep-live connection can be used for all links, It is faster, too.
3. If the cmd line tool will be used by your php, it is better we can directly use php to do it. You need not worry about its performance, because network opreation is the key. This feature's performance is not relation to python/c/c++/php.