RSS

Tools to getting started…

0 Comments | This entry was posted on Dec 31 2007

Getting started with what you say?

Getting started to your own blog…

Oh, that’s sounds awesome… wait… what is a blog?

A blog is a personal site that is dedicated to news or articles that are about one or many given subjects.

Now I’m interested, but what would my blog be about?

Well, first start off with your hobbies. Do you often play the Playstation 3 or your xbox 360? Maybe you like hunting, fishing, trap shooting? Most common blogs are about peoples life directly. What they did at school, or updates on their work activities. For instance, PapaFace.com is a blog directed in Web Design.

Ok, I figured out what I want my blog to be about… where do I start?

Well first, the easiest blogging system I have ever ran into was Google Blogs… called Blogger.

Blogger however limits your templating and coding spectre.

Ok, I’ve used Blogger, but as you said… I am limited on what I can do.

Ok, go ahead and grab a cheap little host.

As a customer of this host… http://www.aptohost.com/ I am obligated to recommend them! Sure the template is sloshy, but they are 100% a great host.

Then go ahead and zoom over to one of these sites (no selected order except for word press because it’s by far the best)

http://wordpress.org/ (The greatest blog tool ever)
http://www.blogphp.net/ (Kind of sloshy, but easy for custom upgrades)
http://www.kubelabs.com/kubeblog/ (Nice little blogging tool, very nice)
http://www.publicwarehouse.co.uk/php_scripts/lightblog.php (Again, sloshy, but easy for custom upgrades)

Ok, I’ve installed the one I chose. Loving it! Now how do I get more people to view my blog…

Ok, there is quite a few methods to gaining hits on your blog.

1) If your signed up to a community forum, go ahead and leave your URL in your signature. Give it some color so it stands out.
2) Add it to some RSS feeds and blog directories according to your blog category.
3) Add some downloads that match up to your site, there is always some freeloaders and they love free stuff!
4) If you have some money, add some advertisements to frequently viewed websites.
5) Send a huge e-mail to everyone on your list explaining how cool your blog is and how it might give them cancer (don’t really say that, it’s not that funny) if they don’t visit your blog.

Thanks Justin, I want to send you some money for helping me.

I can’t accept any donations of any sort, I love helping people. Just send me a link to your blog!

[Slashdot]
[Digg]
[Reddit]
[del.icio.us]
[Facebook]
[Technorati]
[Google]
[StumbleUpon]

A Register/Login Class

6 Comments | This entry was posted on Dec 30 2007

Hello,
Well it has been a while since any posts were made here so I guess its time for me to post something useful (if you're a coder).
I've been working on a new project and in the process I have been constructing a login/register class that could easily fit into any current script I think.
Here it is :)

<?php
class MemberFunctions
        {
        var $pass;
        var $username;
        var $email;
        var $userid;

        function CheckUsername($username)
                {
                $username = trim($username);
                if      (!empty($username))
                        {
               $check = mysql_query('SELECT `id`,`username` FROM `members` WHERE `username`="'.$username.'"');
               if       (mysql_num_rows($check) == 0)
                {
                list($_id,$un) = mysql_fetch_array($check);
                $this->username = $username;
                $this->userid = $_id;
                return true;
                }
               else
                                return false;
                        }
                else
                        return false;
                }

        function CheckPasswords($pw1,$pw2)
                {
                $pw1 = trim($pw1);
                $pw2 = trim($pw2);
                if      (!empty($pw1) && !empty($pw1))
                        {
                        $pw1 = md5(trim($pw1));
                        $pw2 = md5(trim($pw2));
                                if      ($pw1 == $pw2)
                                        {
                                        $this->pass = $pw1;
                                        return true;
                                        }
                                else
                                        return false;
                        }
                else
                        return false;
                }

        function CheckEmailAddress($email)
                {
                        $email = trim($email);
                        if      (!empty($email))
                                {
                                $this->email = $email;
                                return true;
                                }
                        else
                                return false;
                }

        function Register()
                {
                $insert = mysql_query("INSERT INTO `members` (username,password,email) VALUES ('".$this->username."','".$this->pass."','".$this->email."')");
                if      ($insert)
                        {
                        $_SESSION['loggedin'] = 1;
                        $_SESSION['username'] = $this->username;
                        $_SESSION['userid'] = $this->userid;
                        return true;
                        }
                else
                        return false;
                }

        function LoginCheckUsername($username)
                {
                if      (!empty($username))
                        {
               $check = mysql_query('SELECT `id`,`username` FROM `members` WHERE `username`="'.$username.'"');
               if       (mysql_num_rows($check) == 1)
                {
                list($_id,$un) = mysql_fetch_array($check);
                $this->username = $username;
                $this->userid = $_id;
                return true;
                }
               else
                                return false;
                        }
                else
                        return false;
                }

        function LoginCheckPassword($pw)
                {
                if      (!empty($pw))
                        {
                        $pw = md5($pw);
                  $check = mysql_query("SELECT `password` FROM `members` WHERE `password`='".$pw."' AND `username`='".$this->username."'");
                  if    (mysql_num_rows($check) == 1)
                        {
                        $this->pass = $pw;
                        return true;
                        }
                  else
                        return false;
                        }
                else
                        return false;
                }

        function Login()
                {
                if      ($this->pass != "" && $this->username != "")
                        {
                        $_SESSION['loggedin'] = 1;
                        $_SESSION['username'] = $this->username;
                        $_SESSION['userid'] = $this->userid;
                        return true;
                        }
                else
                        return false;
                }

        function Logout()
                {
                if      ($_SESSION['loggedin'] == 1)
                        {
                        $_SESSION['loggedin'] = 0;
                        return true;
                        }
                else
                        return false;
                }

        }
$_mem = new MemberFunctions();
?>
 

Feel free to offer any suggestions as to how the code can be improved as it is still in its early stages.

Update 02 Jan 2008:
I have updated the code to change a few things.

Here is also a way to use the class in your script:

<?php
if      (!$_mem->LoginCheckUsername($_POST['username']))
                {
                $_SESSION['lerror'][] = "Incorrect username entered.";
                }
        if      (!$_mem->LoginCheckPassword($_POST['password']))
                {
                $_SESSION['lerror'][] = "You have entered an incorrect password. Please try again.";
                }
        if      ($_SESSION['lerror'])
                {
                header('Location: login.php');
                exit;
                }
        else
                {
            if  (!$_mem->Login())
                {
                $_SESSION['lerror'][] = "There was a problem logging you in, please try again later.";
                header('Location: login.php');
                                exit;
                }
                else
                        {
                        $_loggedin = 1;
                        }
                }
?>
 

If there are any errors you can print them out using this code:

<?php
if(!empty($_SESSION['lerror'])){
   if(is_array($_SESSION['lerror'])){
        foreach($_SESSION['lerror'] as $value){
              echo $value."
"
;
         }
   }
   $_SESSION['lerror'] = NULL;
}
?>
 

Hope that helps :D

[Slashdot]
[Digg]
[Reddit]
[del.icio.us]
[Facebook]
[Technorati]
[Google]
[StumbleUpon]

Dutch plan to build new island

0 Comments | This entry was posted on Dec 20 2007

The Dutch are a crazy bunch, but I didn’t think they were this crazy. Okay, so the country is getting a bit crowded and because of global warming the sea is rising and eating away at the coastline, but what do you do? You could encourage people not to do the ‘business’ so the population will steady off a little. Or you could build sea defences. But building a whole new island? I understand why they want to do it. The new island will create lots of new room for people to live. It will also act as a shield to protect the actual country itself. But here is the interesting bit, they have decided to make it in the shape of a tulip!

It may seem a bit strange, but the Dutch know their stuff when it comes to water and land. The USA asked for some advice when Hurricane Katrina hit in 2005, the Dutch have also helped India and China with their water problems.

Some people think that they are making the island into a recognised shape for publicity, and attention. I can image there will be some property developers eagerly watching this!

[Slashdot]
[Digg]
[Reddit]
[del.icio.us]
[Facebook]
[Technorati]
[Google]
[StumbleUpon]

Confused Deer

0 Comments | This entry was posted on Dec 18 2007

Part of me wants to keep sorry for this obviously confused animal, but half of me want to join in with the fun. The video shows a deer that has been caught up in a swing. It looks like its antlers have got caught, and it is trying to get free. I wonder how long it was there swinging around?

YouTube Preview Image

[Slashdot]
[Digg]
[Reddit]
[del.icio.us]
[Facebook]
[Technorati]
[Google]
[StumbleUpon]

What people in 1961 thought life in 2000 would be like!

1 Comment | This entry was posted on Dec 16 2007

Every now and again I think about what it would be like to live 20, 40 even 100 years ago. Sometimes when the dinosaurs were around, but they didn’t have broadband so I’m not that interested!

In 1961 a few scientist predicted what life would be like in 2000. It looked as though everything would be so easy that people will probably die from sheer boredom. Here’s what they thought:

Doors will open automatically, and clothing will be put away by remote control. The heating and cooling systems will be built into the furniture and rugs.

You’ll have a home control room – an electronics centre, where messages will be recorded when you’re away from home. This will play back when you return, and also give you up-to-the minute world news, and transcribe your latest mail.

You’ll have wall-to-wall global TV, an indoor swimming pool, TV-telephones and room-to-room TV. Press a button and you can change the décor of a room.

The status symbol of the year 2000 will be the home computer help, which will help mother tend the children, cook the meals and issue reminders of appointments.

Cooking will be in solar ovens with microwave controls. Garbage will be refrigerated, and pressed into fertiliser pellets.

Food won’t be very different from 1961, but there will be a few new dishes – instant bread, sugar made from sawdust, foodless foods (minus nutritional properties), juice powders and synthetic tea and cocoa. Energy will come in tablet form.

At work, Dad will operate on a 24 hour week. The office will be air-conditioned with stimulating scents and extra oxygen – to give a physical and psychological lift.

Mail and newspapers will be reproduced instantly anywhere in the world by facsimile.

There will be machines doing the work of clerks, shorthand writers and translators. Machines will “talk” to each other.

It will be the age of press-button transportation. Rocket belts will increase a man’s stride to 30 feet, and bus-type helicopters will travel along crowded air skyways. There will be moving plastic-covered pavements, individual hoppicopters, and 200 m.p.h. monorail trains operating in all large cities.

The family car will be soundless, vibrationless and self-propelled thermostatically. The engine will be smaller than a typewriter. Cars will travel overland on an 18 inch air cushion.

Railways will have one central dispatcher, who will control a whole nation’s traffic. Jet trains will be guided by electronic brains.

For more, click here

[Slashdot]
[Digg]
[Reddit]
[del.icio.us]
[Facebook]
[Technorati]
[Google]
[StumbleUpon]

Terminator Pig!

0 Comments | This entry was posted on Dec 15 2007

If you have seen Terminator, you will know what I am talking about. The T100 rises up from the liquid goo and becomes his evil robot self. Well, they have done the just that…but with pigs. There pigs gets splattered on the floor, then rise up and become exactly what they were before. It is rather freaky to be honest. I have no idea what it is made of, or if it is legal! Take a look.

YouTube Preview Image

[Slashdot]
[Digg]
[Reddit]
[del.icio.us]
[Facebook]
[Technorati]
[Google]
[StumbleUpon]

Cats that glow in the dark!

0 Comments | This entry was posted on Dec 13 2007

This is rather interesting! South Korean scientists have cloned cats by manipulating a fluorescent protein gene, a procedure which could help develop treatments for human genetic diseases. However, a side-effect is that the cloned cats glow in the dark when exposed to ultraviolet beams. The cats were born in January and February. One was stillborn while two others grew to become adults. The technology can also help clone endangered animals like tigers, leopards and wildcats.

“The ability to produce cloned cats with the manipulated genes is significant as it could be used for developing treatments for genetic diseases and for reproducing model (cloned) animals suffering from the same diseases as humans,” a scientist added.

Maybe we could get a couple of these for Christmas and stick then on a roof or something!

glowingcat



[Slashdot]
[Digg]
[Reddit]
[del.icio.us]
[Facebook]
[Technorati]
[Google]
[StumbleUpon]

Winter has officially arrived…

0 Comments | This entry was posted on Dec 12 2007

…for me anyway. Today was an average day, nothing unusual. I got up at the same time, had breakfast and the usual morning business…and then it happened. I walked outside and there was a chill in the air. The grass crunched beneath my feet and then I noticed something…strange.

My car which I had bought a couple of months back didn’t look the same. It was white. Covered in ice and frost. This is the first time it has happened to me as I only started driving a couple of months back. I casually got into my car and put the heating on, thinking the heat would melt the ice within minutes and I would be off on my merry way. But I waited a while and nothing was happening. I decided to put the window wipers on, it only slid across the frost which wasn’t very helpful. I tried to get the windows down but they were jammed.

I sat there for a while. I had to pick a friend up and I was already a couple of minutes late. I decided to get some cold water and pour it over the windows as I had seen someone do it before. It cleared the front screen, but the side windows were still iced up. I had to go otherwise I would have been late. I started driving and when I came to the end of the road I realised I couldn’t actually see if a car was coming or not. So I sat there for a few more minutes and eventually got the window down so I had a good view even though I was shivering like a cow.

As the journey continued the ice removed itself from my car and all was well. I have now set my alarm 10 minutes earlier in case I have to so the same again tomorrow. Winter is my favourite time of the year, but sometimes it can be bloody annoying!

[Slashdot]
[Digg]
[Reddit]
[del.icio.us]
[Facebook]
[Technorati]
[Google]
[StumbleUpon]

Memory Loss Camera

0 Comments | This entry was posted on Dec 12 2007

Have you ever had an experience where you had something in your hand, you put it down somewhere and you forgot where it was. Well hopefully you wont get that feeling again, thanks to a handy little camera. The camera can fit in the palm of your hand, and can store up to 30,000 images, which is enough for two whole weeks. The camera is produced by Microsoft and takes photos of daily events every 30 seconds so they can be played back later at high-speed to jog the memory.

Researchers are testing the device on healthy elderly people who would typically struggle to recall memories as a result of ageing. It will happen to us all at some point. They tested it on a 63 year old woman and she would usually forget things after 5 days, but the camera increased her memory by 90%.

Dr Chris Moulin who is involved in the research, said: “It is very early days, but the signs are encouraging. Not only were the memories of the event recalled, but the emotions surrounding it were. It has the potential to help people with conditions such as Alzheimer’s and epilepsy as well as people who just struggle with general memory loss. And what is also particularly appealing is that there are no side effects.”

Personally I think my memory is fine, but it would be cool to have one to relive the day, or what you did last week. I want one!

[Slashdot]
[Digg]
[Reddit]
[del.icio.us]
[Facebook]
[Technorati]
[Google]
[StumbleUpon]

Mr Splashy Pants

0 Comments | This entry was posted on Dec 10 2007

Around 100 years ago people realised that the number of whales in the world was going down quite rapidly, this was due to hunting. Whales could be used to make soap, umbrellas, handbags, shoes, lipstick, shaving cream, tennis racket strings and pet food. Although a highly useful animal, its numbers were declining so something had to be done. So a number of organisations were put in place to help stop, or slow down these huntings. Eventually in 1994 all of the countries got together to decide to stop hunting whales. Everyone agreed apart from Norway, Japan and Iceland who said they needed to hunt whales for ‘scientific reasons’. They have since been hunting whales every year in the hundreds, so the people at Greenpeace decided to try and do something.

They decided to tag a humpback whale, and follow as it enters the Southern Oceans, otherwise known as the hunting grounds. They decided to get the public involved so they introduced a competition so that people could name the whale. ( I mean if the whale ended up getting murdered the public could scream ‘YOU KILLED JEFF’ or whatever). The competition got around 11,000 names, which was reduced to 20, one of those included Mr Splashy Pants. The name gained a lot of attention. Sites such as BoingBoing.com posted the story. Reddit even changed their logo to include Mr Splashy Pants in the title. Eventually, over 130,000 people voted, 78 per cent of them for Mr Splashy.

There are now SAVE MR SPLASHY PANTS petitions all over the web, and the Japanese will get more than an outcry if he ends up being made into an umbrella. That I am sure of.

MR SPLASHY PANTS!



[Slashdot]
[Digg]
[Reddit]
[del.icio.us]
[Facebook]
[Technorati]
[Google]
[StumbleUpon]