473,804 Members | 2,455 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading a HP Printer Web Interface

rbt
Hello there,

Depending on the firmware version of the HP printer and the model type,
one will encounter a myriad of combinations of the following strings
while reading the index page:

hp
HP
color
Color
Printer
Printer Status
Status:
Device:
Device Status
laserjet
LaserJet

How can I go about determining if a site is indeed the Web interface to
a HP printer? The goal is to remove all HP printers from a list of
publicly available Web sites... I've tried this approach, but it gets
messy quickly when I attempt to account for all possible combinations
that HP uses:

f = urllib2.urlopen ("http://%s" %host)
data = f.read()
f.close()
if 'hp' or 'HP' and 'color' or 'Color' and 'Printer' or 'Printer Status'
in data:
DISREGARD THE IP

I'm sure there's a more graceful way to go about this while maintaining
a high degree of accuracy and as few false positives as possible. Any
tips or pointers?

Thanks in advance!
Jul 18 '05 #1
0 2110

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4748
by: Umesh | last post by:
Hi all I am trying to change the printer(like paper source ,etc) setting in C#. But i am unable to do it. I am not sure how to do it. should i have to use WIN API like Openprinter , getprinter , setprinter . I did try with PrinterSetting.setHDevMode but it does not work. Its their is a simple way to change printersetting. thanks umesh.
5
7126
by: Hank | last post by:
My Access 2000 code has been running for several years in our main plant. Now we need to install it, as a stand-along application, at remote sites, some of which are out of state. My problem is the printer destination for special reports such as stickers and mailing labels. The Mailing Label report is, of course, designed here for a specific printer (Mailing Label). At another site, the name could be completely different. Other than...
2
3052
by: Ryan Gregg | last post by:
I've got a dot matrix printer that I need to print a line at a time to. This is being used for an audit log on an application and every event that occurs needs to print out right as it occurs. I've previously had this working well in a serial communication method where I talk directly to the printer using control codes and what not. However, it seems that the higher ups want to be able to use a network printer or other Windows-configured...
4
7501
by: Support | last post by:
Hello: I would like to create my own printer driver so that it is available in all applications through the file ->Print menu of applications. The driver will essentially take the contents of what is in the parent application and save it so file (like a file - save as). I will do some information processing when the printer driver is called so I will need it to open a form (like other drivers do). I am reading about pdd files and I see a...
2
27166
by: Tor Inge Schulstad | last post by:
Hi I'm developing a POS software using an Epson TM-T88iii printer with a cash drawer connected to the printer. The printer is connected via a usb interface to the pc. Can anyone tell me how I can open the cash drawer from my VB.NET application? The printer driver requires me to use a soft font named "control" in the printer, and print the letter "A", but if I'm right, the .NET framework does not support using soft fonts...
3
15038
by: Michael | last post by:
Hi, I'm trying to print barcodes to the Dymo LabelWriter printer. Put everytime I send a job to the label printer it just outputs an empty label. If I change the default printer back to the standard printer(HP LaserJet), it prints fine. Has anyone worked with Label printers like this. Here is the code I'm using: Private Sub cmdPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPrint.Click try Dim BarCode...
2
3994
by: anniec | last post by:
Hi, I've got a Zebra 110XIIIPlus and I've made a barcode software in A2K. I need to be able to print 4 different size of barcode... all in 4'' widht. My problem is that all label are being printed in the size that is the default in the printer driver setting... no matter which paper size I choose in my report. I'm either missing something in the printer setting or this printer cannot do this...
7
2310
by: pI | last post by:
I've got simple question. What are some functions names in C for programming printers? Maybe some library ?
29
3015
by: Jerim79 | last post by:
I did try to find the answer to this before posting, so this isn't a knee jerk reaction. What I am trying to accomplish is to have a script that opens a cookie, reads a value, and then use a switch/case to take action based on that value in the cookie. I want to set the cookie manually, so I don't need setcookie(). I see that in PHP it stores the cookie in memory. Is there a way to have PHP just read a cookie from the desktop machine?...
0
10561
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10302
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9132
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6845
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5505
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2976
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.