R
R
recloudor2016-07-18 10:36:15
Node.js
recloudor, 2016-07-18 10:36:15

How to work with Phantomjs through Proxy?

It is necessary that Phantomjs requests come from different IPs

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Vapelnik, 2016-07-18
@dvapelnik

try doing like this:

var phantom = require('phantom');
phantom.create({
    parameters: {
        proxy: '12.34.56.78:9876'
    }
}, function(browser){
    browser.createPage(function(page){
        page.open('http://example.com/req.php', function() {
            ...
        });
    });
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question