You are not logged in.
First of all, I have to tell I'm really a zero in web programming.
The thing is, that I want to find a way to display my HP printers toner levels on a webpage ( my print server runs an apache webserver for other purposes too ).
My idea was to get a cron job working ( which works ) that generates a file with the contents of my toner's levels, by doing something like:
#hp-levels > /srv/http/levels.txt
and then, include them in a webpage like:
<?PHP
include ("levels.txt");
?>
The thing is, that it works well, but the output is ugly, the lines are sticked one after the other instead of beginning a new line at each (well ) new line.
I've tried it with other bash command outputs too, like ifconfig, same thing.
So, how can I put some form on that text block?
Last edited by scar (2011-12-19 22:32:45)
“The future has already arrived. It's just not evenly distributed yet.”
― William Gibson
Offline
Have you tried e.g. https://aur.archlinux.org/packages.php?ID=33293 ?
Edit: I don't know a thing about php, but wrapping some text in <pre> tags does the trick for html:
pkg
PKGBUILD
src
txt2html-2.51-1-any.pkg.tar
txt2html-2.51.tar.gz
insead of
pkg PKGBUILD src txt2html-2.51-1-any.pkg.tar txt2html-2.51.tar.gz
Last edited by karol (2011-12-17 00:10:58)
Offline
got it. thank you.
“The future has already arrived. It's just not evenly distributed yet.”
― William Gibson
Offline