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

多线程如何设置代理? #36

Closed
shuyabin opened this issue Jun 26, 2018 · 1 comment
Closed

多线程如何设置代理? #36

shuyabin opened this issue Jun 26, 2018 · 1 comment

Comments

@shuyabin
Copy link

大佬 使用多线程插件的时候怎么添加代理求指导一下。

@jae-jae
Copy link
Owner

jae-jae commented Jul 2, 2018

$ql->curlMulti([
    // ...
])->start([
    // 全局CURLOPT_*
    'opt' => [
        CURLOPT_TIMEOUT => 10,
        CURLOPT_CONNECTTIMEOUT => 1,
        CURLOPT_RETURNTRANSFER => true,
        // 设置代理IP
        CURLOPT_PROXY => '192.11.22.14:888'
    ]
]);

CurlMulti的start()方法是可以接收curl代理参数的,

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

No branches or pull requests

2 participants