Crew-Portal Posted August 30, 2007 Share Posted August 30, 2007 Quick question. When you enter a domain into your browser it takes you to a DNS SERVICE which then takes that name you entered and takes you to the webservers IP address. Quick question! How does it do that? Does it do that through a PHP script or what? Quote Link to comment Share on other sites More sharing options...
madspof Posted August 30, 2007 Share Posted August 30, 2007 i guess it could be done that way but i tink they use a domain name server which uses whateva code is need for the os so for windows it would be built out of dll and exe and w/e and for any other o/s i wouldnt have clue Quote Link to comment Share on other sites More sharing options...
Jessica Posted August 30, 2007 Share Posted August 30, 2007 I think people who don't know what they're talking about shouldn't answer. I sat for a minute and thought, can I answer this insane question in a way that will make sense? And I said to myself, no. I even asked my husband who much smarter than I and more experienced with this sort of thing, how would you answer that? And he said "I wouldn't". How does DNS work? I don't know, but I'm sure someone out there has written information on it that you could find through Google. DNS has nothing to do with PHP, that much I am sure of. Quote Link to comment Share on other sites More sharing options...
trq Posted August 30, 2007 Share Posted August 30, 2007 Wikipedia has a pretty thorough explanation. Here. A Domain Name Server is a server specifically built for such a task. While you can write servers in PHP, its definitely not the most efficient language to do so with. What exactly are you wanting to do? Quote Link to comment Share on other sites More sharing options...
madspof Posted August 30, 2007 Share Posted August 30, 2007 okay dns works liek this you send a request for a page for exmaple google.com this request is sent to your isps dns server your isps dns server will have an idea of what google ip address is i.e it will be cached this is done because if every dns server in the world kept asking gooogles servers what their ip is it would become very congested if your isp dns server does not know it will send out a request to ine of your countrys dns servers asking if they know if not, your countries dns server will ask serval different cpuntries dns servers if they know of the site you are looking for and what its isp is. if not then the message is sent back down the line eventual back to you give you the famous 404 not found page and if i didnt know what i was on about i would of neva started reading the post Quote Link to comment Share on other sites More sharing options...
Jessica Posted August 30, 2007 Share Posted August 30, 2007 My husband wanted to add this: "The short answer (or what I thought was going to be a short answer) is that you are asking about something on the client side (i.e. the browser). The browser works with the operating system, which in turn works with the client system's configured DNS server(s) to provide the IP address(es) associated with the hostname entered in the browser. All the web server will see is the client system's browser making the connection and requesting the page. The web server (and in turn PHP) will never "see" the DNS request the client makes. PHP has no part in this process." Quote Link to comment Share on other sites More sharing options...
Crew-Portal Posted August 30, 2007 Author Share Posted August 30, 2007 Okay so my question is this! Domain names cost money they normally cost around 7 dollars p year for hosting. Is there a program I can download to give myself a free domain like (www.mysite.com) not www.mysite.freedns.com? kinda like a webserver like http://24.76.180.18 is free so can you get free domains hosted throught your computer with a C++ or C# program or am I going to have to make my own Quote Link to comment Share on other sites More sharing options...
neylitalo Posted August 30, 2007 Share Posted August 30, 2007 You can indeed run your own DNS service, but it will require a very stable server, and a dedicated, static IP address is strongly recommended, if not necessary. Bind is the industry standard for DNS server software, and can be found at www.bind9.net. And one more little thing: Domain names are never free. You have to buy them from the appropriate domain name authority. Quote Link to comment Share on other sites More sharing options...
Jessica Posted August 30, 2007 Share Posted August 30, 2007 Or you could get a job. Quote Link to comment Share on other sites More sharing options...
tomfmason Posted August 30, 2007 Share Posted August 30, 2007 Yes, download wamp or something and you can have http://localhost Quote Link to comment Share on other sites More sharing options...
Azu Posted September 3, 2007 Share Posted September 3, 2007 if not then the message is sent back down the line eventual back to you give you the famous 404 not found pageNo, you get 404 page not found if you succesfully connect to the server without any problems, but it doesn't have the file you put in the URL. E.G. http://www.phpfreaks.com/asdf Yes, download wamp or something and you can have http://localhost Omg why did you post goatse on here!? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.