Another issue
Also each piece of code checks if for example megaupload links are working, then another piece of code checks for fileserve links are working... If I put all types of urls at the database, same table, how to separate each file host to pass each piece of code??
Are each links a distinct record? If yes than you should add a second field for host name only.
example would be
record 1
field 1 fileserve field 2 www.fileserve.com/files/aididpisdpid

record 2
field 1 filesonic field 2 www.filesonic.com/files/xyzeeeda

This way you can order the select by field 1 keeping hosts together so you can do the checks as a batch (api or curl).