The documentation for PhantomJS does show how to use proxies. However, how is is used in PHP when using the library from PHP PhantomJS?
For that matter, how are any of the PhantomJS addons used?
I'm currently doing this with CURL to use proxies:
curl_setopt($curl, CURLOPT_PROXY, "http://$proxy:$port");
curl_setopt($curl, CURLOPT_PROXYUSERPWD, "$username:$password");
I'd like to do the exact same thing with PhantomJS. I have it installed and configured properly and this example works (PHP PantomJS's own example).
use JonnyW\PhantomJs\Client;
$client = Client::getInstance();
$request = $client->getMessageFactory()->createRequest();
$response = $client->getMessageFactory()->createResponse();
$request->setMethod('GET');
$request->setUrl('http://jonnyw.me');
$client->send($request, $response);
print_r($response);
Where does the proxy info go here?
Thanks. I'm very new to PhantomJS.