How to locate a network printer ? so PHP script that execute this module can print the documents ?
thx in advance
Printable View
How to locate a network printer ? so PHP script that execute this module can print the documents ?
thx in advance
That can't be done with PHP. All you can do is prodivde a button in HTML that displays the print dialog.
I have, give or take the odd doubt, absolutely no idea what you are talking about. Perhaps you could repeat your query with an increased level of depth and verbosity so that we can better assist.Quote:
Originally Posted by fella_amore
I'm sorry about my previous post...i'm just looking for a solution to find a network printer using VB function thx
Even if it is a network printer, I believe you still have to have it installed on your PC before you can use it.
That being said, listing out what printers are installed on your PC with VB is very easy.
Can't you send some kind of signal to all your network devices and when you get a specific response that you are able to distinguish printers from computers and so on?..
Must be possible I think but how?
Find a router, send a broadcast and see what happens? something like it?
And to kill a mosquito, burn the house down. You could end up transferring many thousands of packets in a large network. Network admins frown on that kind of promiscuity.Quote:
Originally Posted by darktown
I tend to agree with what was said on network traffic usage. You would be better off if you keep a list of the network printers available in a file (stored centrally) and you then reference that file if you want to present a list of printers to the user.
You can then periodically (say once every week) update the central file.
You can get a list of network printers programatically, but this depends on what type of printers you have installed. If the network printers have an IP address and your IP range is say 10.10.0.1 to 10.10.0.100, and the printers use a standard print server type of connection, for each IP you can try and connect to the printer on port 9100 using the winsock component.
If the printers you have are shared under windows, you need to first get a list of PC/PrintServer names from your network using the net view command and placing the contents in a text file. Then, read the text file and for each PC/PrintServer entry, run net view PrintServer >>prninfo.txt. You can sieve prninfo.txt file to find what printers are shared.