Configuring Content Protection using Content/PHPScripts

Discussion in 'aMember Pro v.4' started by mikelinen, Feb 20, 2012.

  1. mikelinen

    mikelinen New Member

    Joined:
    Jun 22, 2011
    Messages:
    22
    Question about configuring PHP Content protection in V4. I read the user manual on how to do it, followed those instructions, and it seems to work; I am just not sure if I am doing it completely right, or if PHP content protection is even the best way to go.

    For the product, I have one webpage that I am selling access to. I can name the file for that webpage anything I want. I could make the page an html page if I want but I made it php for this method. I forget why I chose PHP approach in v3, but it worked, and it works in v4.

    The file is the index.php file sitting alone in one folder (the folder has the product name on it). I like the simple product url that allows (no file extension).

    My protection goals are this: if someone types in url to that folder, they are challenged to login or buy the product. And if they log in, they go to that page. And after logging in once, I like having the cookie set so they can get in repeatedly without logging in again for a while. And I don't want the page to get crawled by Google, etc.

    In the top of the code of my protected php page, I used the php script shown at the top of the V4 user manual section Content/PHPScripts, and it works. If someone tries to access that page, they are now asked to log in. And members with access to the product identified in the array are able to get to the page once logged in. So far so good.

    But I am wondering if I should also make an entry in the admin Products section called Protect Content. Either for the containing folder, or for the file itself, or a link. Is there any reason to do that?

    I can see making an entry for a Link is useful, so that the user can use the Profile page to jump to their subscribed content. But that's not for protection. So is there any reason to add other protection entries in the "Protect Content" section, say for the folder or the file? I seem to recall in V3 needing to both protect the folder using php_include, and to put the php code in the top of the file... so wondering if I need to do that (also protect the folder) in V4?

    Or would it be better not even to use the php method and just protect the folder or the file, given the content protection goals I just described?

    Thanks for your thoughts.

Share This Page