php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #67994 Add an option to declare a proxy to be used by the curl calls
Submitted: 2014-09-10 09:19 UTC Modified: 2014-09-14 04:55 UTC
From: samantha dot halfon at gmail dot com Assigned:
Status: Open Package: oauth (PECL)
PHP Version: 5.4.32 OS: Debian Wheezy
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: samantha dot halfon at gmail dot com
New email:
PHP Version: OS:

 

 [2014-09-10 09:19 UTC] samantha dot halfon at gmail dot com
Description:
------------
I wasn't able to find any option in the documentation enabling me to use a proxy in the curl calls. Tests using the stream method (with stream_context_set_default to declare the proxy) failed as well. 


Test script:
---------------
        /*$default_opts = array(
            'http'=>array(
                'method'=>"GET",
                'header'=>"Accept-language: en\r\n" .
                "Cookie: foo=bar",
                'proxy'=>"http://192.168.0.30:3128"
            )
        );

        $default = stream_context_set_default($default_opts);*/

        $this->_oauth = new \OAuth($options['consumerKey'], $options['consumerSecret']);
$this->_oauth->getRequestToken($this->_options['requestTokenUrl'], $this->_options['callbackUrl']);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-09-14 04:55 UTC] datibbaw@php.net
Have you tried setting the request engine?

$this->_oauth-> setRequestEngine (OAUTH_REQENGINE_STREAMS);
 [2014-09-15 13:21 UTC] samantha dot halfon at gmail dot com
Sorry, it's missing in the code sample but yes, I had this line in my code as well

$this->_oauth-> setRequestEngine (OAUTH_REQENGINE_STREAMS);

Thanks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 22:01:30 2024 UTC