I need a php script that will do the following:
-Take as input a txt file with a list of proxies (one proxy per line e.g.
The script should use these proxies and create one connection for each one at the same time. For example if there are 20 proxies, 20 connections should be created at the same time.
Each connection should fetch and download the contents of a URL which will be read from a database. The database is like that:
id, url, filesize
Once the contents are downloaded, they should be saved as [url removed, login to view] and the filesize cell of the database should be updated with the filesize of the file written to disk.
Please note the following:
->There should be concurrent connections, 1 for every proxy.
->Each connection should not download the same urls as another connection. So you need to create a script that will somehow lock the rows that each connection is using so that the other connection reads other rows from the database.
->You are free to modify the database and add columns or create new tables.