Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy support when fetching remote files #16

Merged
merged 4 commits into from
Mar 23, 2012

Conversation

vitorbrandao
Copy link
Contributor

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.

@GaretJax
Copy link
Owner

Exceptional! Great pull request, thank you noisebleed

GaretJax added a commit that referenced this pull request Mar 23, 2012
Proxy support when fetching remote files
@GaretJax GaretJax merged commit e52aa8d into GaretJax:master Mar 23, 2012
@vitorbrandao
Copy link
Contributor Author

No problem. I just love your project, very helpful. Thanks ;)

You'll need a travis service hook to "light up" your new shiny travis button. See > here < how to do it.

@GaretJax
Copy link
Owner

Done... I guess we'll have to wait now ;)

(so the mail about a failing test I got today was because of you :D )

@vitorbrandao
Copy link
Contributor Author

Yep, sorry about that!

You can push the Test Hook button in the admin/travis page to trigger the build manually. Afterwards, on every push, the repo is automatically tested and the build status updated. The travis logo reflects the status of the master branch.

You may disable email notifications if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants