miffe Posted May 29, 2007 Share Posted May 29, 2007 Yes, I know this question is not directly related to PHP, but it's for a PHP application I am producing. It runs on a MySQL/PHP server on one of my computers in a LAN. (IP 192.168.1.68), Now, to access it from another PC I type in the IP (or make a shortcut) and it appears... but when I disconnect/reconnect the router I get different IP's as everything gets rearranged. How can I establish a 'virtual address' or something like an internal hostname?Thanks .-miffe Link to comment Share on other sites More sharing options...
Mr_CHISOL Posted May 29, 2007 Share Posted May 29, 2007 Hi, you either need a DNS-server (dynamic name service or something like that) that keeps track of the ip and give it is a static name, or you just use a static ip instead (easiest solution...) Link to comment Share on other sites More sharing options...
miffe Posted May 29, 2007 Author Share Posted May 29, 2007 Hi, you either need a DNS-server (dynamic name service or something like that) that keeps track of the ip and give it is a static name, or you just use a static ip instead (easiest solution...)can't give it a static IP, this router kinda sucks, it's a router-DSL modem with all functions built in, etc.Hmm, dns server... I think that means I would have to go live on the net right?Is there no local way? Link to comment Share on other sites More sharing options...
justsomeguy Posted May 29, 2007 Share Posted May 29, 2007 You already have a hostname. Right-click on My Computer, and select Properties. Click the Computer Name tab. Keep your computer name fairly short and one word, if you want to change it you can click the Change button. If you name your computer svr123 then you can type http://svr123/ in the address bar to connect. Link to comment Share on other sites More sharing options...
Mr_CHISOL Posted May 29, 2007 Share Posted May 29, 2007 1. The router should have nothing to do with you setting a static ip on a computer in the network (this is done in the network settings on the computer...)2. You could install a DNS-server in your LAN, it isn't hard, but it's harder than setting a static IP...Question to justsomeguy: Haven't use win for a long time, but: can other computer also access that computer with the name?? Link to comment Share on other sites More sharing options...
miffe Posted May 29, 2007 Author Share Posted May 29, 2007 INCREDIBLE justsomeguy, thanks a lot!I had no idea about this before, worked fabulously! Link to comment Share on other sites More sharing options...
justsomeguy Posted May 29, 2007 Share Posted May 29, 2007 Question to justsomeguy: Haven't use win for a long time, but: can other computer also access that computer with the name??Yeah, I've got it set up like that at home. My personal computer is also my server, and when I'm working on one of the development machines I can access it fine. As long as a computer can find a computer with the name either on the local subnet or through the internet using DNS it should be able to connect. Link to comment Share on other sites More sharing options...
reportingsjr Posted May 30, 2007 Share Posted May 30, 2007 So, you could name your computer something like iamgreat.com and you could go to http://iamgreat.com for your own free webserver? Or does it not work with periods and such? Thats sweet! Link to comment Share on other sites More sharing options...
morrisjohnny Posted May 30, 2007 Share Posted May 30, 2007 So, you could name your computer something like iamgreat.com and you could go to http://iamgreat.com for your own free webserver? Or does it not work with periods and such? Thats sweet!that won't work. It would only work locally not via the internet.Correct i think? someone tell me if i'm wrong Link to comment Share on other sites More sharing options...
justsomeguy Posted May 30, 2007 Share Posted May 30, 2007 When you use a TLD like .com or .net, your computer will go to the root servers for .com to look up the domain name. You don't want it to do that, that's not the computer you are looking for. Your computer is not administered by the .com root servers. My computer at home is named Bigpimp (from several years ago), so I type in http://bigpimp/pma for example to open phpMyAdmin.If you use something like .com then you will need to spoof a .com DNS server on your network and point that name back to your IP in order for it to work, which you would have to update every time your IP changed. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.