Monday, March 19, 2007

PHP Password Function

By John Dixon Platinum Quality Author

When developing a web application that enables users to register, it is often necessary to generate a password that would be (typically) emailed to an email address provided by the user at registration time. This article shows how to create a simple PHP function to generate a password.

The function, generate_password(), described below generates an eight character password, although it would be very straightforward to change it so that it generated a shorter or longer password.

function generate_password() {

$letterlist = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z");

$firstletter = $letterlist[rand(0,count($letterlist) - 1)];

$secondletter = $letterlist[rand(0,count($letterlist) - 1)];

$thirdletter = $letterlist[rand(0,count($letterlist) - 1)];

$fourthletter = $letterlist[rand(0,count($letterlist) - 1)];

$fifthletter = $letterlist[rand(0,count($letterlist) - 1)];

$sixthletter = $letterlist[rand(0,count($letterlist) - 1)];

$number1 = rand(10,99);

$number2 = rand(10,99);

$word = $firstletter.$number1.$secondletter.$thirdletter.$fourthletter.$number2.$fifthletter.$sixthletter;

return $word;

}

The $letterlist array simply contains all the letters in the alphabet, in both lower and upper case. You could shorten this list, or change the items in the array so that they are, for example, short words instead of individual letters.

For example:

$letterlist = array("b", "m", "s");

or

$letterlist = array("ben", "mat", "sus");

but neither of these would produce such a good password.

You could also change the $word variable so that it contains fewer characters.

For example:

$word = $firstletter.$secondletter.$number1;

but again, this would produce a less secure password.

About the Author: John Dixon is a web developer and technical author. These days, John spends most of his time developing dynamic database-driven websites using PHP and MySQL.

Go to http://www.computernostalgia.net to view one of John's sites. This site contains articles and photos relating to the history of the computer.

To find out more about John's work, go to http://www.dixondevelopment.co.uk

Article Source: http://EzineArticles.com/?expert=John_Dixon

Website Training - Create a Simple Website

By Robert McNesby Platinum Quality Author

Not so long ago if you wanted to have a website you looked to the pros (geeks). The first thing you did was start reaching in your pocket to check your finances. It was a foregone conclusion you were not going to escape this experience without a significant financial hit.

You got the basic website, enough to get you online, but not much else. Hopefully you negotiated a price before you jumped off the board. If you needed extras, it was like eating in an ala carte, Chinese restaurant 1 from column A, 1 from column B. To put it bluntly, it was expensive.

But as usual, good old American ingenuity saw a way to capitalize and stepped in. Enter the era of point and click websites. Now you can purchase a website hosting plan for as little as $5.95 a month. This includes a domain name and hosting privileges. Warning: the $5.95 fee might mean you have to commit to a year, but that’s fair isn’t it? By the way, there is no shortage of hosts to choose from. Shop around.

The techies who created these sitebuilders have made them almost idiot proof. They include step by step tutorials, as well as online support. Once you choose your website title, colors, templates (design) etc. your site will be live.

Once inside you will be given a potpourri of choices. These are click on icons with tools to build your page. Some examples:

  • Text: various locations on the page where you can place your text content.
  • Pictures: same as above but with pictures.
  • Links
  • Site add-ons: Special features, i.e. counters, html, blogs, rss, etc.
  • Delete
  • Move items
  • Add page
  • Change page

These are just a few features of these websites. Once you experiment using it a few times, you will find yourself moving around like an expert. If you run across a snag you can call support. Because of the competition, courtesy is a big concern with these hosting programs and you will be treated with respect.

Find out more about websites by clicking link at bottom.

Formerly employed with Arnold Palmer Enterprises as Advertising Manager and Copywriter (Putting Course and Driving Range Division) http://www.theaffableaffiliate.com/

Article Source: http://EzineArticles.com/?expert=Robert_McNesby

FAQs in Choosing a Content Management System (CMS)

By Monica Corral-lorica Platinum Quality Author

Content management system remains to be a big question mark to some web developers and web marketers. They are missing out an important factor in website development by being naïve to CMS. To help webmasters and web developers get the benefit of CMS, here are some of the frequently asked questions about CMS and their answers:

  • What is CMS?
  • CMS stands for Content Management System. This is a system that helps in maintaining and expanding website. It aims to make content and structure expansion easier.

  • What does CMS create?
  • Content management system stores data in a database. It makes pages only when a site visitor asks or searches for it. This is useful especially for websites that constantly updates their information. So when a site visitor asks for a specific page, the system will display the page being searched for. Some systems cache every new page and create a new one only when some changes are made.

  • Is CMS useful in publishing site on different platforms?
  • Content management system is very useful in ensuring your website appears at its best in different platforms. CMS allows you to create different templates that will be suitable to different platforms. This can be done without changing anything with the content.

  • Is CMS being used now?
  • There are several large organizations that are already using content management system. Most websites prefer to use CMS because of its promising features and benefits in terms of web content and structure maintenance and expansion.

  • What is the cost of CMS?
  • The cost varies depending on the supplier. Some may charge a large amount but includes training on its usage. Others are cheap as well. But be careful in choosing low fixed rate since most of the time the supplier doesn’t give extra technical support.

  • Will there be website restrictions if I use CMS?
  • Content management system breaks up the presentation and content by using templates. There are systems that restrict templating. But others don’t offer restrictions. There are also systems that impose restrictions on how the site is hosted. So when looking for a CMS, consider asking the supplier about the restrictions of the system.

  • Can I use my existing data base?
  • In choosing for CMS service, be sure that the system can be easily linked to your existing database. This makes working easier. Most websites have data stored in their own databases. Easy linking of the existing database with the system is a big relief for work.

    This article is written by nPresence, an online web marketing agency that specializes in Search Engine Optimization, Pay Per Click advertising, Content Management Systems, Web Design, Conversion Tracking and Analysis. For all your web marketing needs, please visit CMS Service.

    Article Source: http://EzineArticles.com/?expert=Monica_Corral-lorica

AJAX and SEO – can they co-exist?

By Joanne Elizabeth Platinum Quality Author

Before getting into an understanding of the fuss surrounding the co-existence AJAX and SEO, let us first answer the question. Can SEO and AJAX co-exist? The answer is that the two will definitely have to co-exist, and both developers and end-users will stand to benefit from this.

Emerging technologies tend to have an uncomfortable relationship with existing techniques. The obvious reason is that the existing techniques are created on the basis of existing technologies. AJAX and SEO share a similar relationship.

Asynchronous JavaScript and XML (AJAX) brings together various technologies to create a technique that make web pages more like web applications. The key benefit of AJAX is that the page has a greater sense of interactivity, and the user requests are rendered in smaller portions. In other words, AJAX enables the creation of a scenario that is both data-centric and user-centric. Developers were skeptical towards the use of AJAX, but with the introduction of the Google Web Toolkit (GWT) this changed drastically. GWT made AJAX easier for developers to create applications in, and needless to the say the end user stands to benefit the most from this.

Search engine optimization (SEO) is a technique used to enhance the visibility of a website vis-à-vis search engines. Using various SEO techniques, websites enhance their visibility so that they would be ranked high on the Search Engine Results Pages (SERP). SEO has become a part of the development lifecycle of websites. Companies, big and small, are becoming increasingly aware about the importance that SEO has, and what it can do for their business.

There was widespread apprehension about AJAX, and its invisibility to search engines. Words like search engine unfriendly were being used to describe AJAX. What was happening with AJAX was reminiscent of the fate that Flash had faced before this. JavaScript, which is what AJAX applications use, is not visible to search engine spiders. In other words, when a search engine spider is crawling a website that is created using AJAX, most of the content would not be visible. The reason for this is that since smaller portions of content are rendered with AJAX, there are no unique URL’s that a search engine can direct searchers too. In other words, the whole purpose of enhancing interactivity would fail.

This can be better explained with this example. If you a product catalog with x number of products on it, you would obviously want that the search engine has a distinct page for every one of the products on the list. When you create this catalog using AJAX, all the information is there on the same page for the user to click and explore. But from the point of view of the search engine crawler, there is one page and therefore it does not direct any traffic to the individual products on your page. One way to circumvent this problem is to create a parallel site targeted for search engine spiders, and other browsers that do not support JavaScript. This is one available option that many websites have already successfully employed to make the two ends meet. And there are in fact, many success stories of websites that have used AJAX, and found ways in which to ensure that the content is visible to search engine spiders.

In other words, the solution lies in being aware of the problems that SEO for an AJAX application would pose, and to counter the same during the construction stage. For instance, in the first load of your AJAX application you must include optimized elements like TITLE and headers. Also ensure that your rewrite your url in the form of a fixed address which the search engines must be able to index and therefore rank Yet another way out is to create as many internal links as possible. Keyword specific inbound links that point towards a specific section, not just the homepage of the website, would also be beneficial.

AJAX saves time that is otherwise spent on refreshing or reloading a page. SEO makes sure that all the hard work that is put in by writers, designers, and developers pays off and the target audience is able to reach the website – their desired destination. The importance of both AJAX and SEO cannot be undermined. And their significance is such that no website owner would want to compromise to make use of one and forgo the other. The co-existence of AJAX and SEO does not seem like a distant dream at the moment. If new technology creates roadblocks for existing techniques, it also often makes way for newer techniques to flourish.


Simple Guidlines for Developing a Website

By Malerie Giaimo

Three General Questions To Answer Before You Begin Creating Your Website

Join the world of digital communication and gain profit from the World Wide Web. In today’s society competition in the business world is higher than ever. Many companies get left behind while few fly to great heights. A major asset that heightens success is an easy, direct, and informative website. Being a part of the World Wide Web creates a market beyond any other communication means. The opportunities are endless and the benefits are immensely rewarding. Ask yourself these three questions to begin the business website process.

Why Do I Want To Create A Website?

Do not be frightened or overwhelmed by the World Wide Web. This futuristic means of communication is here to profit your business. If you are a small local business why not make your business available to the rest of the nation or the world? With a website you can connect to wide rage of clients by publishing your unique information and knowledge to millions. Websites enable you to promote your businesses services and products. In addition, websites back up your other forms of advertising, such as: business cards, yellow page ads, brochures, and billboards. A positive to web address is that they are easier to remember than phone numbers and postal addresses.

Who Is Your Audience?

The first question to ask yourself before building your website is: who is your audience? By answering this question you define who you want to target with your website. With a direct target you draw your audience in further, as opposed to a general site that will confuse and trouble viewers. This defined focus will lead to the future construction of your site. Also, keep in mind everyone may use the web, but not everyone will use your site.

Why Must I Have A Objectives?

Once you know who your audience is describe your purpose and objectives. Give your audience balance and structure by providing them with your specialized information. You do not want to have information that is not interconnected. Provide your audience with the concepts they want and need. Through your objectives you will show them that you are the right business for their requests. Remember this is your creation - be colorful, honest, and simple.

Let Kinetica Media guide you through the process and open your new world of communication. Visit us at http://www.kineticamedia.com The author Malerie Giaimo is a spring Public Relations intern for Kinetica Media.

Article Source: http://EzineArticles.com/?expert=Malerie_Giaimo