Making an Ebook-sale-page (and protecting it)

Discussion in 'HTML & Website Design' started by IanT, Apr 5, 2010.

  1. #1
    Alright, so I am designing an ebook that is based on the content of one of my sites, I intend to make a user-friendly notebook-style ebook that users can download for maybe $5, print, and then use in their own binders as a guide and place to put their notes on the subject.

    Now I know Ill be using a combo of html/php to make the page, but how do you go about protecting the Ebook so that someone cant just put in the download link and get it for free??

    Also, how do you make the Ebook available for people to download? would I need to use my ftp account? (Ive never put files on there for someone else to download so I dont know how to ...)

    Thanks for any help/direction... and if this has been answered already please direct me to a relevant thread as I could not find any when I searched the forum...

    Thanks!!
     
    IanT, Apr 5, 2010 IP
  2. krsix

    krsix Peon

    Messages:
    435
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    After someone downloads it they can still upload it and share with anyone they want, keep that in mind too
     
    krsix, Apr 5, 2010 IP
  3. IanT

    IanT Well-Known Member

    Messages:
    503
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    130
    #3
    I know that is inevitable, But Im talking about the initial safety, the safety I can control
     
    IanT, Apr 5, 2010 IP
  4. krsix

    krsix Peon

    Messages:
    435
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Use something like
    
    	$fname = '/home/iant/not_in_web_path/asdfjkl.pdf';
    	header("Cache-Control: no-cache, must-revalidate");
    	header("Content-Type: application/force-download");
    	header("Content-Type: application/octet-stream");
    	header("Content-Type: application/download");
    	header("Content-Length: ".filesize($fname));
    	header("Content-Disposition: attachment; filename=\"".basename($fname)."\"");
    	readfile("$fname");
    PHP:
    after checking that user is authenticated
     
    krsix, Apr 5, 2010 IP
  5. IanT

    IanT Well-Known Member

    Messages:
    503
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    130
    #5
    that kinda confuses me... what does that do?? (im really new to php... so I dont know most of the intricacies yet)

    Thanks for the reply!
     
    IanT, Apr 5, 2010 IP