Script to get page data in Php or python

2

I want to implement a script that accesses the printers page of my work and get the data, such as number of prints, user names, basically I want to create a control system.

There is a page that I was able to capture the javascript and redoing I get to the page where I want to capture the data.

Already on another site, I can not see the event when I click the menu, how can I see this?

    
asked by anonymous 19.05.2017 / 21:56

1 answer

-1

You can use cURL (search for more options):

First check if cURL is enabled:

The php info option should show

<?php info()
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://sounoob.com.br/labs/pagseguro-test-
curl');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch); ?>

With this you get a string with the result of the page. That way, php allows you to manipulate the DOM of the page and extract the data as you wish. You could also make a script using Ajax to extract the data from the pages you want, if you do not have any settings blocking that access.

    
19.05.2017 / 22:12