Answer the question
In order to leave comments, you need to log in
How can I control proxy usage?
There is a table mb_proxy
in which the list of IP are stored.
I need to control whether a certain IP is currently used or not, I created a column Used
in which I write 0 or 1 depending on the situation, but now I'm faced with the fact that I have 5 sites for which I use a proxy and the problem is this :
If I set Used
it to 1, then one of the sites (there may be 5, 6 or more) uses this IP for a curl request, and it turns out that the other 5 sites will wait, but I want to somehow indicate which specifically, the site uses this IP at the current time, so that with further selection from the database, I can take the same IP for requests on other sites.
Create 5 columns in the database and mark for eachUSED
it is possible, but somehow not practical, if there are more sites, creating 50 columns is stupid.
With a select query, I have a query to 2 tables, I think it will not be very beautiful to create a 3rd one either. In the 2nd table, I have IP records from which requests have already been made (request history to control limit limits). Are there any other solutions?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question