API for PHP connections