Hopefully this is an easy one.
I'm trying to create a custom job list (in PHP at present - but bash is fine cause i can export the output to PHP) from my cups print queus to display on a webpage
echo shell_exec("lpstat -o")
and exploding the resultant value i am able to display
but NOT the three main ones i am currently after
Filename - e.g. "STDIN" or "Document 1 - Microsoft Word"
Status - e.g. "Processing" "Queued" "Printing" "Held"
and (if it's possible)
IP Address of the sending machine.
I want this as a quick overview of whats printing, and so it can be included in the main systems, so the user can click "My Print Jobs" and (if i can use the IP Address as most users appear as NWUSER, USERXP, USER2K, USER98 - defeating the point of having a username [changed for security]) display all jobs in the queues that that machines IP address has sent.
If i can get the RAW data out i can do other stuff on it i want.
I'd also like to avoid using "lynx --dump http://192.168.#.#:631/jobs
" if i can help it.
Anyone any ideas?
Running on Mandrake 9.1 and Mandrake 10.0 Official