This is not a Dreamweaver script. It is a PHP script that can be inserted into a PHP web page.
If you want to use this on your page you will need to name your page with a .php extension so that the server parses PHP.
Secondly view the source code of the file and paste the code into your page in the location of where you want your image to rotate.
Thirdly you will need to define the 3 variables in the file:
$your_image_directory="";
$absolute_path_of_directory="";
$name_of_this_file="";
Put up a test page and try to make it work in the test page before putting it in your live site. Let us know if you have any questions.
Abraham