Vincent Webb

Not Your Average Blogger

So You Want To Create A Private Membership Site For Your Team?

This article is for the team leaders who want to create a private membership site for their team.

Now there are literally hundreds of ways to get this done. I am simply going to show you one simple way to do it in just a few lines of PHP code.

You are going to need a web host with the ability to run PHP files.

Create a new folder in your public_html called members

in the new members folder create a file called index.php

Here's what it will contain:

if (!isset($_SERVER['PHP_AUTH_USER'])) {  
    header('WWW-Authenticate: Basic realm="Private Team Resources"');
    header('HTTP/1.0 401 Unauthorized');
    echo 'Sorry, this is for my team only';
} else {
$file = fopen('users.txt', 'r');
while (($line = fgets($file)) !== false) {   

    if($line == $_SERVER['PHP_AUTH_USER'] ."|". $_SERVER['PHP_AUTH_PW']){
        //Access Granted!
           $access = 1;
    header('WWW-Authenticate: Basic realm="Private Team Resources"');
    header('HTTP/1.0 401 Unauthorized');
    echo 'Sorry, that is not a valid username\password. Try again';


<div align="center">  
Welcome To The Members Area!

Here are some exclusive team resources:

<a href="">Where To Buy Traffic</a><br><Br>  
<a href="">141 Solo Ad Sources To Get Massive Traffic</a>  
<a href="">Get a FREE iPas 2 Account</a><br><Br>


Save the file, now also create another file called users.txt in the same folder

Within this file you are going to have a line by line breakdown of each user + their password seperated by the pipe character |


To add a new user, simply add a new line to this file with the username, the pipe character | and then the password.

To simplify it even more, you really only need a single username and password that you can give out to your entire team on a call or in your private fb group.

Super simple! There's no user registration page, no forgot password function, and a huge security flaw to have all passwords in 1 txt file, but let's face it, your team resources are not THAT special... If someone outside your team wants to get your resources, they will just steal the password from one of your team members anyway.

This was the easy 'down and dirty' way to create a quick membership site without any databases, no fancy wordpress plugins that inevitably break and need to be constantly upgraded, or the need for an IT department & degree in computer science.

With that being said, if this is still over your head, or if you have a desire to create a top notch web presence for your company or team put together by seasoned professionals in graphic design and web development, feel free to reach out to us at and lets see how we might be able to work together.

Please realise we are extremely busy, so it may be a while before we can get back to you. For best results please include as much information as you have and if possible, your budget. If it seems like a good fit, someone will get back to you.

comments powered by Disqus