This assumes that you have followed the installation instructions and have updated the 'Site Setup' page in the administration pages.
Create the folder on your web site which is to be protected e.g. a folder called 'protected'.
Copy an .htaccess file into the root of the folder that you are about to protect. This can be a empty .htaccess file or any existing .htaccess file as the entries will be overwritten.
I have provided a blank .htaccess file in the 'protected' folder which you may use.
Change the permissions of the .htaccess file to 666.
In the left hand menu of the administration pages click on the menu item 'Secure Setup'.
Create a new secure area with an appropriate name such as 'myprotectedfolders' or 'mypremiumcontent'. This name can be anything you like but usually represents the content that is being protected.
Against this entry, add the folder path where you placed the htaccess file. This has to be the full folder path and will look something like /server/site1/public_html/files/
The .htaccess file will be automatically updated with the required settings for the defined folder.
Note that you can enter a number of folders against the secure area if you wish. The customer will then have access to several web folders using the same username / password.
You can now create one or more products which use this secure area.
In the left hand menu, click on the 'Product List' menu item and create a new product item with an appropriate name. In this system a 'product item' is defined as a secure area with particular attributes that define the subscription.
You will need to select from the drop down list the secure area name that you defined previously.
You might want to create several 'products' which point to the same secure area. For example you may have one product called 'GoldAccess' with $250 for 3 months subscription, and another product called 'SilverAccess' with $100 for 1 months access.
This method enables you to add a button or buttons anywhere to an existing web page. The web page can be of php extension or an ordinary htm page.
To create a button, go to the 'Product List' page. Against each product is a 'button' link which takes takes you to a button generator page where you can copy the text and paste it on to your web page.
<form action="http://www.yourservername/phpsecurearea/ipn/process.php" method="post"> <input type="hidden" name="recid" value="1"> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form>The fields that you enter to create the button are :
When the purchaser clicks on the button, the php script will extract all the relevant data from the database and post it to the PayPal server.
The advantage with this method is that any changes you make to the item in the administration pages, such as a different regular billing cost or a different unit length, will automatically be picked up when the button is clicked.
If this were created in the normal way using the PayPal button generating system it would look something like this :
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick-subscriptions"> <input type="hidden" name="business" value="firstname.lastname@example.org"> <input type="hidden" name="cancel_return" value="htp://www.servername.com/cancel_return.htm"> <input type="hidden" name="return" value="htp://www.servername.com/return.htm"> <input type='hidden' name='item_name' value='test'> <input type='hidden' name='item_number' value='item'> <input type='hidden' name='currency_code' value='EUR'> <input type='hidden' name='a3' value='10.00'> <input type='hidden' name='p3' value='4'> <input type='hidden' name='t3' value='W'> <input type='hidden' name='src' value='1'> <input type='hidden' name='sra' value='1'> <input type='hidden' name='srt' value='5'> <input type='hidden' name='bn' value='Elmwood.PHPSecureArea'> <input type='hidden' name='no_shipping' value='1'> <input type='hidden' name='no_note' value='1'> <input type='hidden' name='modify' value='0'> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but24.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form>
Instead of creating a button you may also use an http link which could be used in emails.
The link is of the form http://www.servername.com/phpsecurearea/ipn/process.php?recid=xxx
The above assumes that the application is installed in the folder /phpsecurearea/ and the recid is xxx