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

Ex.
[code]200.200.200.200  thedomain.com[/code]

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" ;'; } ?>

[/code]

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

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

catTab(’01’,’cPath=48′);
catTab(’02’,’cPath=62′);
catTab(’03’,’cPath=56′);
catTab(’04’,’cPath=59′);
catTab(’05’,’cPath=55′);
catTab(’06’,’cPath=63′);
catTab(’07’,’cPath=57′);
?>
[/code]