Finished PHP API, updated all three functions.