phantomjs - Call Http Post inside Phantom JS script -


i using phantom js achieve automation capturing screen information.

after processing captured information, success/failure status denoted api executing http post. best way achieve ?

i tried use phantom-js via node js bridge not reliable mentioned here : https://stackoverflow.com/a/15746154/590589
other options can use ?

thanks help.

adapted post.js, official phantomjs example:

var page = require('webpage').create(),     hq = 'http://example.com/scrape.php',     data = 'success=1';  page.open(server, 'post', data, function (status) {     if (status !== 'success') {         console.log('unable report hq!');     } else {         console.log('payload sent');     }     phantom.exit(); }); 

Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -