Answer the question
In order to leave comments, you need to log in
How to set Header and cookies in PhantomJS?
Is it possible and if so how to set Header and cookies in PhantomJS, here is a code example of how I make a request
$browserObj=\MTS\Factories::getDevices()->getLocalHost()->getBrowser('phantomjs');
$browserObj->setKeepalive(true);
$windowObj=$browserObj->getNewWindow();
$windowObj->setUserAgent($user_agent);
$windowObj->setUrl($url);
$content=$windowObj->getDom();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question