You should be using the PayPal system called IPN. Instant Payment Notification.
When you build the form pointing to PayPal, there are two fields that you can use for your own purposes. (That is, what you put in those fields will have no effect on the PayPal payment process). The fields are "invoice" and "custom". When the payment is accepted at PayPal, they will hit a callback URL on your site and pass you a message that says the payment was accepted and they will also pass back whatever you sent them for "invoice" and "custom".
When you display the form, embed a unique and unguessable secret in the invoice or custom field in the form. Also write that same code to a database with a flag saying "UNPAID".
When PayPal hits your callback URL telling you that the payment was accepted, take the secret code in the invoice or custom field and update flag in the database for that code to "PAID".
So I do something like this:
<?php
// replace "gibberish" with 10-20 random characters (like ASDasd123!@#)
$secret = "GIBBERISH" . $userid . time() . $invoice_id ;
$query = "insert into payments (code,flag) values ('$secret','UNPAID')";
$result = mysql_query($query);
?>
<input type="hidden" name="invoice" value="<?php echo md5($secret); ?>">
Now, all you have to do is modify your protected page to check the database to see if that flag is marked "PAID". If not, then display a message like, "Go away deadbeat".
If you want to grant access for a certain time period, change your callback URL page so that when it updates the flag to "PAID", it also writes the current time. Then in your protected page, you can see when the payment was made and whether or not that falls in or outside the allowed time frame.