get path protocol php code example
Example 1: php get url path name
parse_url( $_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH );
Example 2: phph get server protocol
$protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === 0 ? 'https://' : 'http://';