Skip to content

Instantly share code, notes, and snippets.

@jeroneemou
Created December 13, 2018 10:08
Show Gist options
  • Save jeroneemou/e3f49c09e4fa1f1c5675635f4f799d06 to your computer and use it in GitHub Desktop.
Save jeroneemou/e3f49c09e4fa1f1c5675635f4f799d06 to your computer and use it in GitHub Desktop.
Get Basic Auth header
<?php
$username = "username";
$password = "password";
echo "Authorization: Basic " . base64_encode($username . ":" . $password);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment