how to add custom header ?
this is custom header option:
http://phantomjs.org/api/webpage/property/custom-headers.html
but in where should i add this ? i itried to add in "PJCtrl.js" file , but then my php script kept on loading infinitely. I tried to add like this in "PJCtrl.js" file
`function configurePage(windowObj)
{
try {
if (typeof windowObj.pjsPage == 'undefined') {
windowObj.pjsPage = webpage.create();
windowObj.pjsPage.customHeaders = {
"Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Accept-Language:en-US,en;q=0.8",
"Connection:keep-alive",
"User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36"
};
}`
how to add custom header ?
this is custom header option:
http://phantomjs.org/api/webpage/property/custom-headers.html
but in where should i add this ? i itried to add in "PJCtrl.js" file , but then my php script kept on loading infinitely. I tried to add like this in "PJCtrl.js" file
`function configurePage(windowObj)
{
try {