Skip to content

Instantly share code, notes, and snippets.

@speedygfw
Created June 26, 2014 06:31
Show Gist options
  • Select an option

  • Save speedygfw/3564d88aab719a962dd5 to your computer and use it in GitHub Desktop.

Select an option

Save speedygfw/3564d88aab719a962dd5 to your computer and use it in GitHub Desktop.
ZF2 -basic auth client
<?php
$client = new \Zend\Http\Client();
$client->setUri('http://example.com/');
$client->setAuth($user, $password);
$request = $client->request(Zend\Http\Client::POST);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment