I'm using libcurl in my application to download some web sites. I need to know what IP address those web sites resolve to, to know the specific IP that my curl code is hitting. Is there any way to query the libcurl response to see what IP it actually hit, not just the domain?
The main reason for this is to know which load balanced server I'm hitting.
One option would be for me to get the IP address independently, but I wouldn't be guaranteed to get the same IP if the DNS rotates amongst a number. Or I could get the IP address first, then hit the IP address itself, but some domains require that you request the specific domain and not just the ip address.
Anyone have any other ideas?