Tell me how it will be easier to implement such a search:

There is a MySQL database in it 10,000 records in the form of a domain, you need to find the domains by IP-address. Reshaping the database is not a ride. I thought to select all domains, get it through gethostbyaddr() but will php from 10,000 burst? Maybe there are examples for easier?

  • I have now right now the price is driven and updated to the 73000 position, and did not burst)). If you are afraid, then start and leave))) In general, you can also make portions, 100 records at a time, for example. If you don’t touch the database at all, gethostbyaddr will get the host and search by database - this is a millisecond thing, another thing is that if you strictly search for these 10,000 domains, then with a large load it would be more correct for them to make IP correspondence in the database and time from time to update. - aldem67
  • That's the thing, I was thinking about servings. but maybe there is something else. I think I'll try on 100 entries, if there are no other options. : (((( - wwwplaton
  • Try Sphinx solution - very convenient to work - IOleg
  • @IOleg sphinx man needs to get ip for domains in bd and not to look for them - Naumov

1 answer 1

but in general we solve the problem quite simply. create a field with a match and a shell in php. Add the output in the form of echo and run it through the shell php -f yourScript.php . At the beginning of the script we remove the limits of memory and time. Well, then drink tea and see the progress)