/etc/hosts (or DNS) does not come into play at all. Again, see RFC 2616 for how a webserver can determine which host ("website") was meant by the client.
As the original post mentions in the title "virtual host", I would assume that the web server already is configured to serve multiple websites under the same IP address (and port).
In reply to Re^5: Get data via HTTP on IP and specify virtual host
by Corion
in thread Get data via HTTP on IP and specify virtual host
by j99
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |