php api with examples