Update index.php

added support for slave