Forum Moderators: coopster

Message Too Old, No Replies

Printing a Page

Can I control the number of times a page is printed through PHP?

         

russkern

5:12 pm on Jul 22, 2008 (gmt 0)

10+ Year Member



Hi all,

I'm planning out a project and I have a question I thought I'd throw out...

I am going to be presenting a coupon to a user and I was wondering if there is a way - through PHP - to control the number of times a user can print it.

I figure I can present a PRINT NOW button with the coupon and then record to a database when it is clicked, and then if they view thew the coupon again, check for that and deny viewing the coupon if appropriate.. However... I'm pretty sure I cannot control the Browsers print function..

...is this true?

Thanks in advance...
Russ

Nutter

5:34 pm on Jul 22, 2008 (gmt 0)

10+ Year Member



Not through PHP. By the time it's in the user's browser PHP's job is done.

About denying opening it a second time. What happens if the user views and prints the coupon, closes the window, and the printer jams? They wouldn't be able to open it again to reprint?

What about printing a unique code on each coupon and only accepting each code once?

[edited by: Nutter at 5:35 pm (utc) on July 22, 2008]

venti

6:06 pm on Jul 22, 2008 (gmt 0)

10+ Year Member



I think using some sort of checksum of the users ip address on the coupon would be an easy way to *roughly* limit each person to one coupon if you are trying to do that.