Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

How can I set a web page to be opened ONLY ONCE on a computer?

I want to e-mail a brochure and include a link so someone can log in to a web page and print a coupon out. BUT - I am trying to figure a way to keep them from
1. Saving the page to their computer...that's possible, I know.
2. Keep them from logging in to the page again.

1 Solution

Will the link or login be unique?  If so then you just keep track of those used and don't let it be used again.  This will require server side script and probably some type of database.  At least a database would  be best but you could use some file.  Let me know if you need more details but I will need to know what server side language your server supports or you want to use (e.g. ASP, PHP, Perl).

Let me know if you have any questions or need more information.

As b0lsc0tt said, this can only be done with server side scripting on the web server. The web server would drop a cookie on the client machine, then always check for the cookie upon future visits and deny access.
jimmysupportAuthor Commented:
But if it depended on a cookie, the person could erase the cookie and log in again. I am thinking if I required a name and e-mail address I could use a database as he mentioned.
Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

Yes, the database solution is a good one, but more involved architecture and not really any more reliable. What keeps one from using multiple names and email addrs to get another coupon. In reality, if someone wants to cheat the system, they can figure out how unless you require biometrics or the like :)
It's all a matter of preference and what you feel would work best for your user base.
The other much more complicated solution is to require pre-registration, then generate coupons with a unique barcode, have the POS system record used barcoded coupons and reject duplicates. The company I manage actually has this system in place.
Gary CaseRetiredCommented:
"... How can I set a web page to be opened ONLY ONCE on a computer? " ==>  You can't.  At least not reliably (as you noted, cookies won't work for this, since they're easily bypassed).

"... I am trying to figure a way to keep them from:"

  "... 1. Saving the page to their computer...that's possible, I know." => but again, easy to bypass;

  "... 2. Keep them from logging in to the page again. " ==>  This is, as noted above, the easy way to do what you want, by using a simple database and requiring a name/e-mail login.

HOWEVER ... if your goal is to keep them from printing out more than one coupon, that simply isn't achievable.   Too many ways to bypass it;  and even if you did, how could you differentiate between an "original" and a copy ??

If you provide more details about exactly what you're trying to achieve, there may be a way :-)
When I made my comment I assumed that the email or link would be unique.  You provided them login information and then my solution would allow you to make sure it was only used once.  If you can't provide a unique login to them then it would be much more difficult, if not impossible, to prevent abuse.  If the printed coupon was customized in some way, maybe the login info, then even if more than one was printed only one could be used.

I hope this clarifies my comment.  We made need more details, like Gary asked for, if this doesn't help or won't work.
You can't keep someone from saving it as it could easily be printed to a PDF Printer or I could do the old fashioned Print Screen.  
No matter how you attempt to solve the coupon abuse issue, the real focus should be at the point of redemption. Assuming the point of redemption is a POS system, it requires a very smart POS system to detect duplicate coupon use.

We had a couple of coupon users/abusers that would screenshot the coupon page, save as PDF and publish on news groups.  We built a system that would detect them at database update time and flag them... never to receive future coupons.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now