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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
6 + 26 = ?
Subscribe to this entry?

 
 [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 23:01:34 2024 UTC