Solved

Need to restrict access to my site

Posted on 2016-09-05
4
63 Views
Last Modified: 2016-09-06
I have two site upcoming. The first shows three online playing cards as a demo of my paid service, and is free to use. Once they have purchased a license on PayPal, they will have access to the 54 online playing card version.

The game has no back end, as far as I know. The questions, hints and answers are CSS, as far as I know.

I have an underlying WordPress site where users can optionally log in and orders can only be placed by registered users. So I suppose I can provide this site only to logged in users who have also purchased this license.

How do I do this with WordPress? I also use WooCommerce as my storefront.

I need to block non-licensed users...

Thanks
0
Comment
Question by:newbieweb
4 Comments
 
LVL 1

Assisted Solution

by:Stefan Hoffmann
Stefan Hoffmann earned 125 total points
ID: 41785581
I'd do it through a page template. You can modify those. Copy one and add source code so that the content is only shown if the user has a licence.

PS: It is very unlikely that the game only consists of css.
0
 
LVL 56

Accepted Solution

by:
Julian Hansen earned 250 total points
ID: 41785628
I am guessing the game runs off javascript. So I would make the javascript load through a php call
<script src="getscript.php"></script>

Open in new window


getscript.php checks to see if the user has registered and then returns the real library otherwise it returns a javascript file that redirects back to the demo page.

You then just need a simple login page that checks the users credentials and sets a cookie that is used by getscript.php to check the users registration status.
0
 
LVL 110

Assisted Solution

by:Ray Paseur
Ray Paseur earned 125 total points
ID: 41785889
This expert suggested creating a Gigs project.
You may need a professional developer to help you with this.  E-Commerce applications usually require some advanced development techniques.  Consider E-E Gigs.

There are some links and ideas in the WP forums, and maybe something in the codex.  Have a look around there.  Here is one example.
https://wordpress.org/support/topic/how-to-make-woocommerce-shop-page-password-protected-1/
0
 

Author Closing Comment

by:newbieweb
ID: 41786069
thanks
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question