質問

I need to resolve a large amount of IP addresses. I'm using gethostbyaddr() for it.

I just recently read about using pcntl_fork() and that if you do fork, you don't have to wait for a timeout.

Since gethostbyaddr will take a long time (30 seconds, I think) to resolve a host before timeout, is pcntl_fork practical for use with a large amount of IP addresses?

役に立ちましたか?

解決

You want a high-performance, asynchronous DNS library for PHP. Fortunately, Net_DNS2 is exactly that.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top