Basic Authentication with PHP

php http authentication

October 15, 2015

It is possible to use the header() function to send an “Authentication Required” message to the client browser causing it to pop up a Username/Password input window. Once the user has filled in a username and a password, the URL containing the PHP script will be called again with the predefined variables PHP_AUTH_USER, PHP_AUTH_PW, and AUTH_TYPE set to the user name, password and authentication type respectively. These predefined variables are found in the $_SERVER array. Both “Basic” and “Digest” (since PHP 5.1.0) authentication methods are supported. See the header() function for more information.

ngRoute vs ui-router

javascript angularjs routing

October 13, 2015

ngRoute merely allows you to assign controllers and templates to URL routes, whereas the fundamental abstraction in ui-router is states, which is a more powerful concept.