Live Example: http://labs.topspin.net/tutorials/pa...ate--runme.php
Page Gate Code: http://labs.topspin.net/tutorials/pa...agegate-v1.zip
To create a campaign id for the var "camp":
1) Create membership product
2) Create buy button: A) Set Access Requirement to the membership created in step 1. B) set the price to $0 and C) set the buy button to buy an image or other digital item in your catalog. Save. The Campaign ID is the var "camp". (You are setting up this buy button to create a gated campaign ID, and not to sell an item -- we will eventually have a way to create campaign IDs, similar to buy buttons, that are associated with gated products. (The aforementioned is a work-around until then.)
This is the PHP authorization script. This small script has two customizable variables at the top of the script: "valid_domain" is the domain (only the domain, the part ending with ".com", is read), and "html" is, of course, where the HTML that's meant to be visible to valid users goes. Any single quotes in the HTML *must* be escaped with a backslash ("\") before them, or the script will fail.