THE TASK. I have a ready and working website. (hapine.com) I need to update it. Therefore, I have a ready-made solution that you can rely on. The site is powered by PHP 7.4.11, server CentOS 8. MySQL MariaDB. Core Frameworks Slim, twig and code from https://github.com/postaddictme/instagram-php-scraper Upgrade required from Slim 3 to Slim 4 and instagram-php-scraper and use the updated code from https://github.com/postaddictme/instagram-php-scraper What does the site do? This is an Instagram browser without registration. The visitor can view profiles, stories, tags, locations. It is possible to search by #hashteg, @profiles, locations In fact, this is all the functionality. Main problem. Instagram fights people like us, accounts are often blocked. A request restriction policy is enforced to avoid blocking. No more than 30 requests per second, no more than 60 requests per minute, no more than 2400 requests per hour, no more than 8400 requests per day. If the limit is exceeded, then another connection is established and requests are sent through another account. The values of the limits 30, 60, 2400 and 8400, I have not checked, and will need to be convinced of their correctness by trial and error. Therefore, it is necessary that in the "Dashboard" it was possible to change the limits on the fly and set them by default. An approximate view of the interface is presented on the screenshots attached to the task in the section "Cookie Settings" Dashboard assignment. Dashboard is completely ready, except for two sections "Cookie Settings" and "Proxy Settings" they need to be updated You can use any design. This is not a matter of principle. You can take the one that I have provided for you, or a simpler option, it may look like a google table (Screenshot_3), it will also suit. "Cookie Settings" (Screenshot_1, Screenshot_2, Screenshot_3) This section exists so that you can manually add Instagram account and mail from the account. Set Instagram account ip address by default and track their work. 1. "Add new account Instagram account". Using this section, you can add new records to the SQL database (Create table `ig_cookie`). Text field for adding new Instagram accounts to the SQL database. Format: login instagram; password instagram; mail@mail.com; password e-mail It is necessary that the script add multiple accounts at once. 2. "Instagram account". This section displays the "login" and "password" values ​​from Instagram accounts stored in SQL (table `ig_cookie`). The "login" and "password" fields can be edited and when changed, the data will be updated in the SQL table (table `ig_cookie`) The trash can icon is functional, it is a button to delete a record from a SQL table 3. "E-mail account". This section displays the "login" and "password" values ​​from the Instagram account mail stored in SQL (table `ig_cookie`). The login and password fields can be edited and when changed, the data will be updated in the SQL table (table `ig_cookie`). 4. "Proxy Settings". The section defines which IP address will be used to connect the Instagram account. The "ip address" field can be edited and the data is updated in the SQL table when changed. The "default" value is equal to the IP address of the server on which the program is running. 5. "Limit request". The "call per second" field and the "call per minute" field set limits on the number of Instagram requests per minute or per second. Provide switches that set the default value. This is necessary so that when new posts (Section 1) from the Instagram account are added, they are assigned a default value. 6. Status. The field "Messages" displays the account status here Try to make the field as informative as possible so that in cases of connection problems you can understand why the account is not working Examples of messages: login in ... - Passed authorization on the instagram server Working ... - Login passed on instagram server and requests are being processed successfully. etc. Very important! Do not create fields in the SQL table for logging the last state of the Messages section, I will introduce that the last state is updated frequently, and logging can heavily load the database. It makes sense to save to the database only if the account is pending (15 days). Help: when an account gets banned, you can not use it for 15 days and the functionality is restored. Include in your code that you can bypass the polling of the account state when Dashboard is not running. "Proxy Settings" (Screenshot_4, Screenshot_5) This section exists so that you can manually add a proxy server 1. "Add new proxy server" Using this section, you can add new records to the SQL database (table `ig_proxies`). Text field for adding new proxy server entries. Format: IP_address: port: login: password, to provide that it would be possible to select the default identification method in the dashboard, and not hardcoded in the code. 2. "IP address Port" Text field displaying SQL tables. Enabling makes changes. 3. "Login Password" Text field displaying SQL tables. Enabling makes changes. 4. "Method" method of identifying the connection with the proxy server. Text box displaying SQL tables. Enabling makes changes. Provide the ability to select the default identification method. The default method. It will be applied to new proxy servers being added 5. "Failed Request". The field displays how many unsuccessful attempts were made when connecting to the proxy server. 6. "Test" button - when pressed, the program tries to establish mixing with the proxy server. In case of success, the button changes the text from "Test" to "Live". In cases of failure. The Test button does not change its text, but in the Failed Request ++ 1. 7. Date and time the record was created in the SQL database. IMPORTANT! The restriction policy described above is my vision for solving the blocking problem. You can implement any other solution. It is important not to write restriction policy code, but to keep the site running 24/7. Therefore, the criterion for the work done will be load testing. Before accepting the job, I will load test the site. If the check is successful, the job will be accepted.