Update index.php

add write in file+some replace