Create diaryapi.php

Diary API file