PHP Classes

File: includes/src/vendor/rmccue/requests/examples/basic-auth.php

Recommend this page to a friend!
  Classes of Subin Siby   Lobby   includes/src/vendor/rmccue/requests/examples/basic-auth.php   Download  
File: includes/src/vendor/rmccue/requests/examples/basic-auth.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Lobby
Web OS to install and run Web applications
Author: By
Last change:
Date: 8 years ago
Size: 392 bytes
 

Contents

Class file image Download
<?php

// First, include Requests
include('../library/Requests.php');

// Next, make sure Requests can load internal classes
Requests::register_autoloader();

// Now let's make a request!
$options = array(
   
'auth' => array('someuser', 'password')
);
$request = Requests::get('http://httpbin.org/basic-auth/someuser/password', array(), $options);

// Check what we received
var_dump($request);