PHPPAL

I really hate doing documentation but here goes....

Concept

The idea behind PHPPAL is to allow sites running phpnuke to be able to charge members for access to their site. This is accomplished using PayPal's new Subscription system and IPN (Instant Payment Notification).

Before you start read the documentation at paypal on the above subjects

Installation

To make a page protected, that is "members only" NUTTER provided the following code (from nukesupport.com)

Name a file noaccess.php and put this in it.

<?php
if(!isset($mainfile)) { include("mainfile.php"); }
include("header.php");
print "Only <a href=user.php>Registered Users</a> can access this Page!!!";
include("footer.php");
?>

Put the following line in what ever modules index.php file you want to be for site members only.
After the line: require_once("mainfile.php");

Add This line: if (!$user) { Header("Location: noaccess.php") ;}

After that upload the noaccess.php in your root phpnuke dir. Everything should work then.
This has been tested on phpnuke version 5.3.1. I have not tried it on any other version. I know it works with these modules on phpnuke 5.3.1.
1) Members_List
2) FAQ
3) NukeGames (note on the NukeGames module Add this line: if (!$user) { Header("Location: noaccess.php") ;} AFTER $index = 1;
4) And a few others I can think of right now.
 

OR

Use the following code in any of your php files so only members can view.

if(!isset($mainfile)) { include("mainfile.php"); }
if (!$user) {
include("user.php");
}
else {




}
 

This version has been written for a windows nt4, iis4 environment. But I don't see why it wouldn't work on any other platform.

Please leave all comments and suggestions, bug reports, abuse flames etc at pal.why2kit.com or pal.y2kinternet.com