PHP cli and web service implementation for validation and client things