ajetrumpet
Banned
- Local time
- Today, 10:05
- Joined
- Jun 22, 2007
- Messages
- 5,638
all,
I am using my hosts file in the system 32 folder to block internet advertisements from company domains. i read an article on it and decided to try it. It actually works great! Here is what mine looks like:
as you can see, I am typing my local host address along with the address the ad comes from in order to block it. I know absolutely nothing about a local host, but what I am wondering is if there is a way I can manipulate this text file using VBA. I am aware of text file streaming, but I have no idea what a local host is, or how to get it through the VBA coding. Is this number the same on all computers? What does it represent?
This number does not show up in DOS under the IPCONFIG command, so I'm not sure if I'm on the right track or not. thanks!
I am using my hosts file in the system 32 folder to block internet advertisements from company domains. i read an article on it and decided to try it. It actually works great! Here is what mine looks like:
PHP:
# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
::1 localhost
127.0.0.1 googleads.g.doubleclick.net
127.0.0.1 pagead2.googlesyndication.com
ect, etc, etc...
This number does not show up in DOS under the IPCONFIG command, so I'm not sure if I'm on the right track or not. thanks!