Create libapi.php

Initial commit