Join 3,564 readers in helping fund MetaFilter (Hide)


How to create a simple coupon distribution website?
November 15, 2010 9:30 AM   Subscribe

Is there a relatively simple way to build a coupon distribution website similar to Coupons.com or SmartSource.com?

The specific stumbling block I'm running up against is that each of these sites has a way for the coupons to be sent directly to the user's default printer, bypassing the page set-up / print dialog box. This is required functionality - what is the easiest way to achieve it?
posted by spilon to Computers & Internet (5 answers total)
 
Judging by a couple of answers I received to this question via PM, apparently I didn't describe my question very well. So, I'll try again, just in case someone who can help stumbles across this question in the future....

First off -- this is a programming question, not an affiliate marketing question. The sites I used as examples simply have a specific capability that I'm trying to find a simple way to duplicate. Other than this one capability, nothing else about the example sites is relevant.

Example 1: If you go to SmartSource.com and print out a coupon, the site loads up a Java applet first, and then the coupon just pops out of your printer. You are not presented the normal print dialog box. This is intended to prevent you from printing multiple copies or saving the coupon as a PDF.

Example 2: Similarly, if you print a coupon at Coupons.com, they make you download and install a piece of custom software. This piece of software serves the same purpose as the Java applet that SmartSource uses - ie, it sends the coupon direct to the printer with no print dialog box.

What I'm looking for is the simplest way to send something from the browser directly to the printer -- preventing the person from either printing multiple copies or saving as a PDF. Preferably, I'd like the user to not have to do anything to make it happen, or do as little as possible. That's why I don't like the idea of making them download and install custom software -- that just seems troublesome and lame to me. I'd be happy with presenting the user some sort of modified, minimal dialog box, if that's possible. Or the page could just pop out of the printer with no user interaction at all. I'm flexible. Just wondering what's possible. I'd hate to head down one road, and then find out there was a much easier path that I overlooked.

So, could something like this be done with Javascript, for example? PHP? ActionScript? Something else? Or is a Java applet like SmartSource uses the best way to go?
posted by spilon at 8:37 AM on November 16, 2010


I hate to say it, but if you have to ask it's likely beyond your capabilities. As a simple exercise: my default printer is a PDF driver. Now what?

The reason they move the step you care about outside the browser is so that they can encrypt it on the wire, prevent people from changing the signed code, and very likely upload some serious personal details back to them. It also helps that most people can't easily read java bytecode or binaries.

How worried you should be this fact depends on the value you're trying to protect. Free stuff from a national chain? Big problem. Dollar off at a local store? Not as likely to pique fatwallet's interest. But essentially, identity on the internet is disposable, and until that changes, you need to bottle up a lot of expertise into a firm like smartsource to raise the bar.
posted by pwnguin at 3:57 PM on November 16, 2010


Thanks. Of course I will need to hire a developer, I just need a pointer in the right direction. Assume for the sake of discussion that I am well aware of the reasons why things are the way they are, and that I know exactly what I want to happen - what is the best fit? Is Java really the best way to skin this cat? Ordinarily, I would probably never create something in Java, but if that's the best solution in this situation, so be it. I'm just wondering if there's a better/simpler option to consider before the ship leaves the dock.
posted by spilon at 4:25 PM on November 16, 2010


Since you're pretty much duty bound to leave the browser and it's fantastic transparent DOM manipulators, this is every bit as much a business question as technical. A windows binary is basically writing off Linux and OSX customers. Java will come with it's own set of hurdles, JRE compatibility, and many damn annoying popups.

We both know it's possible, because people are doing it. I work on server side Java, and outsource the UI to browsers these days, so I can't speak to how easy it would be to implement a direct to printer technique. Presumably you want to fingerprint the hardware and compare it with existing fingerprints in your database, to fight replay attacks. That's where the hard work will be, I suspect.
posted by pwnguin at 4:59 PM on November 16, 2010


Yeah, the prospect of creating and then maintaining individual binaries for each operating system is pretty unappealing. Java seems like a better option than that at least. I was hoping for a simple(r) solution.
posted by spilon at 5:44 PM on November 16, 2010


« Older Can you help me decipher this ...   |  How much is reasonable to spen... Newer »
This thread is closed to new comments.