php-projecthoneypot icon indicating copy to clipboard operation
php-projecthoneypot copied to clipboard

dns_get_record vs gethostbyname

Open thasmo opened this issue 10 years ago • 2 comments
trafficstars

Is there a reason using dns_get_record over gethostbyname? Thanks! :)

thasmo avatar Jun 23 '15 20:06 thasmo

Honestly, it never crossed my mind to use gethostbyname(). Definitely would simplify the code.

Any idea on if one performs the lookup faster than the other? I'm assuming it's a trivial difference.

I need to get in there and reformat the code to be a bit more PSR compliant, I'll consider making this update when I do.

Thanks for bringing this up!

joshtronic avatar Jun 23 '15 21:06 joshtronic

No idea if it's faster, just thought the same; that it could simplify the code.

thasmo avatar Jun 23 '15 21:06 thasmo