Support » Plugins » Is this possible

  • I want to know if this is possible or if there is a plug in that will make this work. I have installed a plug in so that a page I have made will be public yet not listed on any categories throughout the site.

    One of the pages I have hidden like that is a landing page that visitors are redirected to after they make a paypal payment. I know that there is a way to keep this page private using php. I am horrible at programming so I am looking for another way.

    I want my landing pages (the page they are taken to after paypal payment) to only be accessible after they make a payment. I don’t want anyone to be able to access it even with direct linking unless they have been sent there from paypal.

    Is this at all possible? If it is only possible by using php, can anyone direct me to a site that explains it further.

    Thanks for the help,

Viewing 3 replies - 1 through 3 (of 3 total)
  • I guess it’s best to look at some members only plugins?

    Not sure about the specifics, btu I would assume there is content on that page they should only get after they have paid. Why not just pull that data in conjunction with their order id, that way if they don’t have an order in paid status, then they don’t get tos ee the data.



    You can also test for the http-referrer in PHP:

    // if they're not coming from PayPal
    if (!array_key_exists('HTTP_REFERER', $_SERVER)
     || preg_match('#^', $_SERVER['HTTP_REFERER']) === FALSE)
    	// take them somewhere else
    	header('Location: error_page');

    If the $_SERVER global array doesn’t have an item called HTTP_REFERER it means that the visitor is trying to navigate to this page directly. If so, or if the referring page doesn’t look like the PayPal secure page, take the user somewhere else.

    To plug this code into your WordPress template page you would need to check on the URL of the referring PayPal page to make sure this is testing for the right string and change ‘error_page’ to a real location on your site.


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Is this possible’ is closed to new replies.