ntdragon
asked on
Internet Host Name
i'm writing a prog in which i assume
that a name of all the internet servers
is build like that:
http://name1.name2.name3
example:
http://www.google.com
so i would like to know it right
if not then if i have a request from the broweser how can i get the host name from it
example:
GET http://www.google.com/home_pg.gif HTTP 1.0
the host name is www.google.com
thanks
that a name of all the internet servers
is build like that:
http://name1.name2.name3
example:
http://www.google.com
so i would like to know it right
if not then if i have a request from the broweser how can i get the host name from it
example:
GET http://www.google.com/home_pg.gif HTTP 1.0
the host name is www.google.com
thanks
I agree with tosse, e.g. some have .co.uk instead of .com
But you can assume that the host name is enclosed between '//' and the next '/'...
ASKER
i would like to know
how can i get the host name from the broweser request
when broweser requests a file the request look like:
GET http://www.goole.com/home_page.gif HTTP 1.0 header...
i need to get the host name from these request <or any other request like it>
can i do what jkr said
i mean is the host name is writen between // and / <every host name>
my goal is to write a func that will get the host name from the request
<it shouldn't depend on the host name niether on the request what i mean is it should work for every request the broweser might send>
how can i get the host name from the broweser request
when broweser requests a file the request look like:
GET http://www.goole.com/home_page.gif HTTP 1.0 header...
i need to get the host name from these request <or any other request like it>
can i do what jkr said
i mean is the host name is writen between // and / <every host name>
my goal is to write a func that will get the host name from the request
<it shouldn't depend on the host name niether on the request what i mean is it should work for every request the broweser might send>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i"ll write my funcand try it then i"ll get back
There will undoubtedly be a RFC for this, index of those at http://www.internic.net/ds/rfc-index.htm
old link sorry, just found these
http://www-kr.org/~bhkim/RFC/rfc/rfc-index.html
http://www.cis.ohio-state.edu/hypertext/information/rfc.html
http://www-kr.org/~bhkim/RFC/rfc/rfc-index.html
http://www.cis.ohio-state.edu/hypertext/information/rfc.html
ASKER
thanks you all
my func work great with your help
my func work great with your help
I didn't really understand your question, could you define it a bit better?