PHP functions for NodeJS