Brett Parker wrote:
--- Begin Snippet ---
import urllib2
req = urllib2.Request("http://ip.add.of.server/path/to/thing/") req.add_header("Host", "the hostname you really want to present") resp = urllib2.urlopen(req) data = resp.read()
--- End Snippet ---
Note to self: really must learn python! That said I think I can replicate the above in PHP.
Thanks for that, I should have thought about it that way round myself. (I'd been thinking about how to connect by hostname but override the IP, rather than connect by IP but then override the host.)