The client has made the following changes to the job.
Client prefers freelancers from:
You are still able to submit a proposal for this job.
The client prefers freelancers from
a different location.
I have a PHP script which does the following :
retrieves a tempid from a table , updates its status with 1 to make sure that no other script is using that tempid
2. Grabs users from database based on that tempid . Each tempid has about 10K users so there will be a long loop .
3. Requests a page for each user using the username as parameter. The response is then analyzed and an email address(which is urlencoded) is extracted
4. The database is updated with that email address.
To increase the performance I make multi-requests (200 at once) using multi-curl
I run 10 scripts on the server in the same time . The server has about 15 GB ram but after some time it blocks / doesn't respond anymore. The CPU goes up to 100% .
In conclusion I need someone to optimize this script for high performance and lower resource consumption . I run the script directly from php CLR (e.g php mail.php )
You can download the script from [obscured] /u/35480696/mail.php
The database has index on ...
Sign in or Register to see more