5 Of The Best Ways To Increase Your Alexa Page Rank
Install the Alexa toolbar or Firefox’s SearchStatus extension – why? Well, it appears that Alexa ranks are dependant on who visits your website with the Alexa toolbar installed or the Firefox alternative.
Encourage visitors to use the Alexa toolbar, you can do this through jQuery pop-ups, banners – however you want, just encourage, encrouage, encourage your visitors to install that toolbar! It will make all the difference!
Use Alexa redirects on your website URL. Do this: http://redirect.alexa.com/redirect?www.mysite.com . Replace ‘www.mysite.com’ with the www. address of your site. So what effect does this have? Well, if you leave this URL in blog comments, forum posts etc. This directly increases your rank, regardles of whether or not the visitor has the toolbar.
Flaunt Your Address in sites like forums, blogs, and other popular sites – in summary, wherever you think you can get your site name and address, get it in there! But be cautious not to start spamming.
Blog About SEO and SEO related content, such as Alexa – this is one of the things that gets webmasters hyped up! They love to hear about it! So obviously they will read about it, meaning better rank for you!
Site Visits (Part 2): 5 Ways To Improve Page Rank
Now, in the second part of the series we are going to look at ways to improve upon your page rank, if you scored 7 or over in the last post, there isn’t really a need for you to read this post, but hey – if you want to – i ain’t gonna stop you!
One: If you’re the owner of a non-script site, e.g. a regular site owner, not WordPress – every document will contain tags such as description and keywords. These can be found in the <head> of your document. You should add relevant keywords to help people find your site through search engines, and a good description in under 160 words about your site. If you’re a WordPress owner, you can also install many plugins which can help you do this too. A good example is: All In One SEO.
Two: Join Google’s Webmaster Central. Link. From here you can easily analyze your website stats. By doing this you can also monitor how your website keywords affect your SEO performance. In fact – I use this service, it’s really good (and free!)
Three: Feed Google and other search engines with a good sitemap! Sitemaps are so important to your site, it allows search engines to crawl your website to find all the pages in your site. A sitemap is also something good to use in conjunction with Google Webmaster Central.
Four: Visit popular forums! I will soon be starting a forum here at MyTutorialz! (You can post your site here). However, there are many more popular forums out there. All you need to do is find a forum that is relative to your site, join the forum – and as a signature just add your website link. This will gain you links from popular sites, guaranteed to give you a higher rank!
Five: Encourage other sites to link back to your site. This may work also if you do a bit of ‘give and take’ with the owner of another website, prehaps they display a link to your website, you display one to theirs? Sounds good!
Now watch that figure keep growing!
Site Visits (Part 1): Check Page Rank
I’m back
! And with a new blog post series, this time not about HTML, staying with the website theme – but looking at how to increase website visits. This tutorial will be an extremely short one!
First: You’re gonna need to see how your site ranks, use the tool below to help you:
| Check Page Rank of any web site pages instantly: |
| This free page rank checking tool is powered by Page Rank Checker service |
So, how did you do? Did you get 5 or lower? If so – oh dear, we’re gonna have to improve upon that aren’t we? Well, in the following posts we will improve this!
For now, goodbye!
Make A Login System
Make A Login System
Most websites you visit these days, including this one, seem to have a login and registration system. This is normally to control who can download files, or control access to certain content. In this guide, I will show you how to do the same.
Before we begin, it is a requirement have you have had experience with MySQL and PHP, if not you are probably going to struggle completing this guide.
Step 1
Let’s begin by creating the top part of the structure. First save the file below to the website images folder:
Now, as we are going to be storing information permanently, we need access to a MySQL database, if you do not have a database at this stage, please create one before continuing.
So to create our table in the database, enter the following SQL code:
CREATE TABLE users (ID MEDIUMINT NOT NULL AUTO_INCREMENT PRIMARY KEY, username VARCHAR(60), password VARCHAR(60))
So, this will create a table called ‘users’, and 3 fields – entitled: ‘ID’ , ‘username’ and ‘password’.
Step 2
Registration Script:
Now this page concentrates on the registration part of your login system. You should copy the code below into a new PHP document entitled: ‘add.php’.
<?php
// Enter your corresponding database connection details here.
mysql_connect
("my.hostaddress.com", "dbusername", "dbpassword") or die(mysql_error());
mysql_select_db
("The_Database_Name") or die(mysql_error());
//When the form has been posted, this code works.
if (isset($_POST['submit'])) {
//This checks for empty fields, and displays an error message if any blank fields are found.
if (!$_POST['username'] | !$_POST['pass'] | !$_POST['pass2'] ) {
die('Error: You missed out a required field.');
}
// Uses database to check for existing usernames.
if (!get_magic_quotes_gpc()) {
$_POST['username'] = addslashes($_POST['username']);
}
$usercheck = $_POST['username'];
$check = mysql_query("SELECT username FROM users WHERE username = '$usercheck'")
or die(mysql_error());
$check2 = mysql_num_rows($check);
//If the username is already in use, this error is displayed.
if ($check2 != 0) {
die('Sorry, the username '.$_POST['username'].' already exists, please choose another.');
}
// Checks both passwords entered match.
if ($_POST['pass'] != $_POST['pass2']) {
die('Error: Passwords do not match');
}
// This part encryptes the password for added security
$_POST['pass'] = md5($_POST['pass']);
if (!get_magic_quotes_gpc()) {
$_POST['pass'] = addslashes($_POST['pass']);
$_POST['username'] = addslashes($_POST['username']);
}
// This part posts the details to the database.
$insert = "INSERT INTO users (username, password)
VALUES ('".$_POST['username']."', '".$_POST['pass']."')";
$add_member = mysql_query($insert);
?>
<h1>Congratulations</h1>
<p>That's another user! You may now <a href=login.php>login>.</p>
<?php
}
else
{
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<table border="0">
<tr><td>Username:</td><td>
<input type="text" name="username" maxlength="60">
</td></tr>
<tr><td>Password:</td><td>
<input type="password" name="pass" maxlength="10">
</td></tr>
<tr><td>Re-enter Password:</td><td>
<input type="password" name="pass2" maxlength="10">
</td></tr>
<tr><th colspan=2><input type="submit" name="submit" value="Register"></th></tr> </table>
</form>
<?php
}
?>
Step 3
Login Script:
You should now copy this code, into the file, named: ‘login.php’.
<?php // Connects to your Database mysql_connect ("my.hostaddress.com", "dbusername", "dbpassword") or die(mysql_error()); mysql_select_db("Database_Name") or die(mysql_error()); //Checks if there is a login cookie if(isset ($_COOKIE['ID_my_site'])) //if there is, it logs you in and directes you to the members page { $username = $_COOKIE['ID_my_site']; $pass = $_COOKIE['Key_my_site']; $check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) { if ($pass != $info['password']) { } else { header("Location: members.php"); } } } //if the login form is submitted if (isset($_POST['submit'])) { // if form has been submitted // makes sure they filled it in if(!$_POST['username'] | !$_POST['pass']) { die('You did not fill in a required field.'); } // checks it against the database if (!get_magic_quotes_gpc()) { $_POST['email'] = addslashes($_POST['email']); } $check = mysql_query("SELECT * FROM users WHERE username = '".$_POST['username']."'")or die(mysql_error()); //Gives error if user dosen't exist $check2 = mysql_num_rows($check); if ($check2 == 0) { die('That user does not exist in our database. <a href=add.php>Click Here to Register</a>'); } while($info = mysql_fetch_array( $check )) { $_POST['pass'] = stripslashes($_POST['pass']); $info['password'] = stripslashes($info['password']); $_POST['pass'] = md5($_POST['pass']); //gives error if the password is wrong if ($_POST['pass'] != $info['password']) { die('Incorrect password, please try again.'); } else { // if login is ok then we add a cookie $_POST['username'] = stripslashes ($_POST['username']); $hour = time() + 3600; setcookie(ID_my_site, $_POST['username'], $hour); setcookie(Key_my_site, $_POST['pass'], $hour); //then redirect them to the members area header("Location: members.php"); } } } else { // if they are not logged in ?> <form action="<?php echo $_SERVER['PHP_SELF']?>" method="post"> <table border="0"> <tr><td colspan=2><h1>Login</h1> </td></tr> <tr><td>Username:</td><td> <input type="text" name="username" maxlength="40"> </td></tr> <tr><td>Password:</td><td> <input type="password" name="pass" maxlength="50"> </td></tr> <tr><td colspan="2" align="right"> <input type="submit" name="submit" value="Login"> </td></tr> </table> </form> <?php } ?>
Step 4
Members Page:
Now, you need a page called ‘members.php’, on this we will include a code to check that the user has a valid seesion, and that they are not just entering the url in the address bar.
<?php // Connects to your Database mysql_connect ("my.hostaddress.com", "dbusername", "dbpassword") or die(mysql_error()); mysql_select_db("Database_Name") or die(mysql_error()); //checks cookies to make sure they are logged in if(isset ($_COOKIE['ID_my_site'])) { $username = $_COOKIE['ID_my_site']; $pass = $_COOKIE['Key_my_site']; $check = mysql_query("SELECT * FROM users WHERE username = '$username'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) { //if the cookie has the wrong password, they are taken to the login page if ($pass != $info['password']) { header("Location: login.php"); } //Or thay are directed to the members page. else { echo "<h1>Your Title</h1>"; echo "This is an example parapraph displayed to all users who have logged in successfully.<p>"; echo "<a href=logout.php>Logout</a>"; } } } else //No cookie? No go! They are redirected to the login page. { header("Location: login.php"); } ?>
Step 5
Logout Page:
You now need a page called ‘logout.php’, on this page the login cookie is destroyed.
<?php
$past = time() - 100;
//this makes the time in the past to destroy the cookie
setcookie(ID_my_site, gone, $past);
setcookie(Key_my_site, gone, $past);
header("Location: login.php");
?>
This brings us to the end of this tutorial!


