Unstoppable Domains

Login Script

Spaceship Spaceship
Watch

DebX420

VIP Member
Impact
53
I am looking to add a login script to a site. I want it so I have to specify usernames and passwords. It will be like a members section on my site where i post videos to tutorials and such for premium members only. Any idea on how I could do this? :)
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Three ways you can do this:

1. (Best imo) - Make it yourself. Find a good tutorial online (google is helpful) and see if you can follow it. However, if you don't have any experience in coding PHP, then I advise avoiding this one because if you are inexperienced you may leave security holes that could potentially bite you in the rear later on. Use something like http://www.phpeasystep.com/workshopview.php?id=6 if you are interested.

2. Find one and install it. There are many free scripts out there for you to use, and I'd suggest start searching at sites like hotscripts.com.

3. Hire somebody to make it. Just be careful who you hire, check the trader ratings.
 
0
•••
These aren't really difficult to make. All depends on what site features entail, however. Depending on how many features, the backends, etc. may be larger making the project cost more or become more time consuming.

-RageD
 
0
•••
All I want to have is:

when you go to domain.com/members , it prompts you to login. Without this login information, you can't see any subpages. On the subpages within, there will be resources; videos, PSDs, etc.
 
0
•••
If you have any PHP background at all, I suggest that you look into that tutorial link I posted in my previous post. It's not difficult and you should be able to code it yourself, since it seems to be exactly what you want.
 
0
•••
magnify.net is a whole video turnkey hosting that you might need. it's free to host sites and you can accommodate members to view videos or upload their own video it can be set in the admin panel.
 
0
•••
It depends on how much you want the system to do. If you want your own video streaming player, members to modify details, account activation via a payment processor and so on then it maybe best to find a ready made solution. B-)
 
0
•••
Yes, a CMS even could do for your purposes (e.g.: Joomla, PHPNuke, e187, etc.)

I can give you a quick basic synopsis, however, on creating a login system in PHP. Basically, you can do it one of 2 ways depending on whether you want only a few names or you want to store it to/from a database.

I have to leave for work here in a few moments so this is going to be a crash course :P

Basically (this is without database support) your function to login should look something like this:
PHP:
<?php
function login($user,$pass)
{
	// static vars for simple function here
	// No DB support
	$login1 = "username";
	$login2 = md5("your_password_here");

	if(!$user OR !$pass) {
		print "Please enter both a username and password!";
		return false;
	} else if($user != $login1 OR $pass != $login2) {
		print "Incorrect login credentials";
		return false;
	} else {
		$_SESSION['username'] = $user;
	}
  return true;
}
?>

To use that function try something like this:

PHP:
<?php
session_start(); // Very important that this goes first otherwise can't read sessions
login("username",md5("your_password_here"));
echo("<br /><br />Your username is: ".$_SESSION['username']);
?>

This is obviously a HIGHLY simplified version of what you're looking for.

You can also input this into an HTML form which processes which is what you'd be looking for which would also be simple, but have to leave this very moment for work :P

-RageD
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back