GaretJax/phpbrowscap — pull request #16 by noisebleed (2012-03-23 17:55:33+00:00)
Title: Proxy support when fetching remote files

This PR gives support for networks behind a proxy.

Proxy support is accomplished by setting a stream context to the `file_get_contents()` call.

Usage:

$browscap = new Browscap('/tmp');

// auto-detect proxy settings from the environment
$browscap->autodetectProxySettings();

// or, set proxy settings manually
$browscap->addProxySettings('proxy.example.com, 3128, 'http', 'myuser', 'mypass');

// check defined stream context options
$options = $browscap->getStreamContextOptions();

// remove proxy settings
$browscap->clearProxySettings()

Also, some phpunit tests are added as well as a travis config file for automatic testing on travis servers.