alwex / php-casperjs

simple PHP wrapper for CasperJS
MIT License
182 stars 71 forks source link

working with cookies #32

Open foxpcteam opened 7 years ago

foxpcteam commented 7 years ago

Hi, in js we could make this work like:

var fs = require('fs');
var cookies = JSON.stringify(phantom.cookies);
fs.write(cookieFilename, cookies, 644);

The phantom is global variable in PhantomJS. More information you can get in wiki

if it possible to work with cookies in php-casperjs?

foxpcteam commented 7 years ago

?

alwex commented 7 years ago

Hello, you will need to be able to import dependencies in your script, we just need to be able to add some code before casper script in the generated js. The problem I see is that you will need a /node_modules somewhere or to install your node modules globally before being able to require them.

foxpcteam commented 7 years ago

Hi @alwex , any example how to do that will be helpfull.

Thanks

natterstefan commented 7 years ago

@foxpcteam @alwex any news here?