Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <a href="#" class="text-dark launch" id="<?php echo $row->id; ?>"> Launch</a>
- $('.launch').on('click', function () {
- $.ajax({
- type: 'POST',
- url: 'http://localhost/sample/run_scrape',
- success: function (status) {
- console.log(status);
- }
- });
- });
- public function run() {
- $html = shell_exec("phantomjs C:samplescraper.js");
- echo json_encode($html);
- }
- var page = require('webpage').create();
- page.open('https://detectmybrowser.com/', function(status){
- console.log("Status: " + status);
- if(status === "success"){
- page.render('example.png');
- }
- phantom.exit();
- });
Add Comment
Please, Sign In to add comment