Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Need to restrict access to my site

Posted on 2016-09-05
4
61 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 55

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 109

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Online promotion is consistently becoming more important for all types of businesses. From Facebook ads to search engines to YouTube videos, there are all sorts of channels that can effectively be used to promote a business or product. But how shoul…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

839 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