Using a Proxy: PhantomJS with PersonaTool Business

If you have to automate some PhantomJS jobs and want to use PersonaTool Proxies: That is easy!

First of all: you will need a valid PersonaTool account to do the scripting and then it goes like this…

Activate a proxy with your PersonaTool account. You will need the crypted password from your sessions.json file in the PersonaTool directory: it is part of the JSON values and can be found for “pw”:…

Proxy Session File

On the shell, you have to activate the proxy with a call to the REST interface like this, once you have the value (please note, the values for password and the proxy IP have been changed to fantasy values):

wget ";"

where the “l=” value comes as a URL encoded value set like:

encodeURIComponent('{"login":"'+ userSession.login +'","pw":"'+ +'"}');

and the “p=” value is the country and the IP of the PersonaTool proxy you want to activate.

The answer from the REST call should be “RULES LOADED”, once successful.

Use the proxy with PhantomJS like this:

phantomjs --proxy= --proxy-type=socks5 somescript.js

which should then call your script with the right proxy settings.

This way you can easily create a cronjob that checks specific settings via our proxies!