added api/thread.php to index.php