curl-users
Antw:make curl connect to a given IP/vhost?
From: NIJSSEN <kees.nijssen_at_quicknet.nl>
Date: Tue, 07 Sep 2010 17:42:09 +0200
Date: Tue, 07 Sep 2010 17:42:09 +0200
On 07/09/10, Tomasz Chmielewski <mangoo@wpkg.org> wrote:
I'm running a geo-ip web cache system.
Assuming I have a www.example.com domain configured, DNS replies with a different IP, depending on who asks (i.e. location in US would get a 1.1.1.1 address, location in Europe would get a 2.2.2.2 address, and so on).
Now, I'd like to monitor if each of the caches replies with correct content (i.e. a given page contains a given string).
Can I somehow make curl connect to a given remote IP and fetch a given vhost?
I'm thinking in something in the line of:
curl --remote-ip 1.1.1.1 www.example.com
curl --remote-ip 2.2.2.2 www.example.com
Is something like this possible with curl? I checked the manual, but I didn't find an option which would be similar in functionality.
I may have misunderstood your request, and assumed you wanted to modify the IP-address of the client (and by that its geographical location) to make the server present a certain content. If you want to connect to a different server (i.e. the DNS directs you to a different IP-address based on who asks, as you wrote), I guess you could just connect using the required IP-addresses instead of the host name www.example.com: curl <options> 1.1.1.1 or curl <options> 2.2.2.2
Have fun using cURL!
Kees Nijssen
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-07