Work on sites before the DNS has rolled over (by editing the hosts file)

Important: This does not work if you are behind a proxy, which includes antivirus firewalls and such.

  • Right click on the hosts file in C:WindowsSystem32driversetc
  • Go to properties, turn off “read-only
  • Open the file using Notepad or any text editor
  • Add a line to the bottom of the file with the IP and domain
  • When you are done, don’t forget to turn read-only back on again


Use the IP of the new server and then the domain you want that IP to resolve to.

Now you can browse to that domain and it will resolve to the new IP even though the DNS hasn’t been updated yet.

Easy PHP/Javascript rollover images for osCommerce links

The javascript portion:

[code lang=”php”] < ?php function JavaCatTab($num) { echo 'tab' . $num . 'up = new Image();'; echo 'tab' . $num . 'up.src = "images/design/tab_' . $num . '.gif" ;'; echo 'tab' . $num . 'down = new Image() ;'; echo 'tab' . $num . 'down.src = "images/design/tab_' . $num . 'down.gif" ;'; } ?>


The links portion (place below the first part somewhere):

[code lang=”php”] < ?php function catTab($num, $link) { echo '‘;
echo ‘‘;
echo ‘‘;