Pregunta

I would like to get data about ink, free pages (paper) etc from the printers in company network. Each of these printers (mostly Minolta) has an www interface, so I can get these data by creating browser process in my program, direct it to go to the address "http://192.168.X.YY/data.htm", download all the page code and retrieve the data from it. Is this possible without this process? If I know that these data are under each IP/data.htm can I use this information to download data in the different way: socket, ftp, etc.

In general: if you have some data on the website (no database access obviously), how you retrieve this data?

¿Fue útil?

Solución

From the looks of it, your printer provides REST-based services. You can use libcurl to make REST based API calls. (This holds for most websites also!)

Otros consejos

It doesn't sound like it implements a REST interface from the description you provided.

It sounds like your idea is to scrape data from an HTML page. That's fine too, although it's somewhat fragile (e.g. could break with a printer firmware upgrade).

Anyway, you tagged the question with .NET so if you want to use the .NET approach, you might want to look at creating a WebClient and parsing the resulting data return from the DownloadString method.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top