LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   CUPS job list (https://www.linuxquestions.org/questions/linux-networking-3/cups-job-list-195131/)

AcerKev 06-18-2004 06:09 PM

CUPS job list
 
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

Cups provides
ID
Name
User
Size
State

using
PHP Code:

echo shell_exec("lpstat -o"

and exploding the resultant value i am able to display
Job ID
Name
Size
Size
Submit Time
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


All times are GMT -5. The time now is 05:18 AM.