Web Hosting Talk







View Full Version : Code Help - Replacing www. with IP Number


wf19
12-03-2002, 11:20 PM
Based on the Resolution in this thread:

http://www.webhostingtalk.com/showthread.php?s=&postid=732720#post732720

I want to change the line:

var b = 'forums.thesite.com';

whereby I want to replace

'forums.thesite.com'

with an IP number (i.e. 134.23.342.2)

Question 1

How do I determine the corresponding IP number? Can I use a site like http://www.samspade.org or http://www.arin.net ?

Question 2

What will the new code be?

Will it be:

var b = '134.23.342.2';

or something else?

wf19
12-03-2002, 11:21 PM
On second thought, I don't think this is a good idea afterall. Advice from a friend:technically, if the user gets there by a link that reads http://130.34.233.2, otherwise i don't think it would work, since document.referrer is a string that contains the URL that was used to get to the page. i may be wrong. again, you'd have to test it.Therefore, the exact text is probably the best way to go about it and leave it alone.