daily pastebin goal
77%
SHARE
TWEET

file_get_contents

elinberg May 30th, 2017 22 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $username = 'username';
  2. $password = 'password';
  3.  
  4. $context = stream_context_create(array(
  5.     'http' => array(
  6.         'header'  => "Authorization: Basic " . base64_encode("$username:$password")
  7.     )
  8. ));
  9. $data = file_get_contents($url, false, $context);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top