Skip to content

Instantly share code, notes, and snippets.

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

  • Save speedygfw/2cd5bdf932a70d5307db to your computer and use it in GitHub Desktop.

Select an option

Save speedygfw/2cd5bdf932a70d5307db to your computer and use it in GitHub Desktop.
ZF1 - http client with basic auth
<?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