Choosing The Best PHP Host For Your Website Or Blog
By [http://ezinearticles.com/?expert=Darren_Lambert]Darren Lambert
Choosing the right PHP web hosting company for your website or blog is critical. The downtime and lack of configuration offered by the low-end hosting providers can be severely detrimental to the performance and success of your website.
With so many PHP hosting companies advertising their services on the internet it can be difficult to chose which is the right one for your website or blog. If you chose the wrong host, and subsequently suffer problems, moving your website to a new host can be a painful and time consuming task.
I'll discuss the key features to look at when assessing a potential hosting company:
Bandwidth
Bandwidth is the total amount of data that your website can deliver in a single month. If you exceed the bandwidth limit your account may be suspended until you buy more bandwidth, or upgrade your account. Ensure you select a hosting package that allows you enough bandwidth for your current traffic, and for the foreseeable future.
Disk space
This is the amount of space you are allocated on the web server to store all of your files. Media rich websites can often use up disk space quickly. Ensure your potential PHP hosting package offers enough disk space for your current website, and its future growth.
Domains
Most people use one domain on a single hosting account. However, some people like to run several websites, or domains, from a single hosting account. If you intend to do this ensure the hosting package allows add-on and parked domains.
Databases
PHP hosts set a limit on the number of database you can use. If you are using a Web 2.0 application, or any other type of PHP application than uses MySql databases, ensure the hosting package has sufficient databases for your needs.
Uptime
This is the amount of time that the web server will be able to deliver your website to readers. 99% is ideal, cheaper hosting often offers less.
Fantastico
Fantastico is a system that quickly and easily installs popular Web2.0 applications into your hosting package. Most hosts include Fantastico, which allows you to easily install WordPress, Drupal and other blog and CMS systems.
Taking the time to chose the correct PHP web hosting company and package can save you a great deal of time and money as your website or blog grows.
Compare the [http://www.ascenddirectory.com/best-php-hosting ]best PHP hosting companies and packages. Darren is an experienced webmaster and PHP developer, and has worked with many PHP hosting companies.
Article Source: http://EzineArticles.com/?expert=Darren_Lambert http://EzineArticles.com/?Choosing-The-Best-PHP-Host-For-Your-Website-Or-Blog&id=812052
Posted By: Illusion Technologies
http://www.illusiontechnologies.com
Friday, November 16, 2007
Thursday, November 15, 2007
PHP Developers
How to Learn PHP and MySQL as Quickly as Possible
By [http://ezinearticles.com/?expert=Clint_Lenard]Clint Lenard
Learning Programming is a tough subject, no matter which language you choose.
It took me months to figure out php and MySQL enough to build real, quality, Websites that were "good enough".
Eventually I figured out the easiest way to learn. It took me MONTHS to figure it out... but I did.
So what does it take to learn a Programming Language such as PHP?
"Doing" is what it takes. 90% of the people who try to take on such a task end up feeling "dumb" or "slow". This usually is NOT the case. I've found that, like myself, most people try to learn PHP from reading and going through code to "understand" what it means.
I was the same way until I was told "just do it". My mentor must have been the most patient man on the face of this earth - because I was constantly telling him I could not do it. But he kept on me telling me the same line I'm telling you: "just do it".
What does this mean? It means trying to create your very own scripts, whether small or of decent size. Start out with printing out the date to the browser. Continue with Loops. Create scripts that create mathematical equations. Print out your name, last name, etc.
Once you figure out the basics, make sure you continue to learn by doing! You will never be able to take your skills to the next level just by reading.
I also stress to other newbies that they need to learn by watching as well. Writing code can become quite a task and it's better to see someone else do that, if possible (which it is by watching videos).
It's quite easy to get caught up in bad practices while writing code if you do not follow good programming standards. Sloppy (spaghetti) code seems to be the evil of the programming world that occurs from newbies who read online tutorials by so called "programmers". Most of these "programmers" are NOT what they claim to be. So be careful of whom you choose to learn from.
PHP and MySQL (database) go together like peanut butter and jelly. I cannot tell you how important it is to learn these two languages together. MySQL may not be the "best" Database in the world but it is very easy to learn and very capable of building large scale applications.
So remember: if you're not "doing", you're not learning. Start learning PHP basics and make sure you're following along and trying to code your own small scripts when starting out. I know, I know... it LOOKS like it's too hard. It's not. This is not something you're going to learn overnight, but it's quite possible that you can learn enough to do what you need to do in just a matter of weeks!
Keep learning and continue doing.
Want to learn PHP at rapid speed? [http://learnbyvideo.blogspot.com/2007/11/learn-php-by-video.html]Check out these awesome Video Tutorials I've found!
If you're looking to become a PHP programmer - you need to see [http://learnbyvideo.blogspot.com/2007/11/learn-php-by-video.html]these videos!
Article Source: http://EzineArticles.com/?expert=Clint_Lenard http://EzineArticles.com/?How-to-Learn-PHP-and-MySQL-as-Quickly-as-Possible&id=819035
By [http://ezinearticles.com/?expert=Clint_Lenard]Clint Lenard
Learning Programming is a tough subject, no matter which language you choose.
It took me months to figure out php and MySQL enough to build real, quality, Websites that were "good enough".
Eventually I figured out the easiest way to learn. It took me MONTHS to figure it out... but I did.
So what does it take to learn a Programming Language such as PHP?
"Doing" is what it takes. 90% of the people who try to take on such a task end up feeling "dumb" or "slow". This usually is NOT the case. I've found that, like myself, most people try to learn PHP from reading and going through code to "understand" what it means.
I was the same way until I was told "just do it". My mentor must have been the most patient man on the face of this earth - because I was constantly telling him I could not do it. But he kept on me telling me the same line I'm telling you: "just do it".
What does this mean? It means trying to create your very own scripts, whether small or of decent size. Start out with printing out the date to the browser. Continue with Loops. Create scripts that create mathematical equations. Print out your name, last name, etc.
Once you figure out the basics, make sure you continue to learn by doing! You will never be able to take your skills to the next level just by reading.
I also stress to other newbies that they need to learn by watching as well. Writing code can become quite a task and it's better to see someone else do that, if possible (which it is by watching videos).
It's quite easy to get caught up in bad practices while writing code if you do not follow good programming standards. Sloppy (spaghetti) code seems to be the evil of the programming world that occurs from newbies who read online tutorials by so called "programmers". Most of these "programmers" are NOT what they claim to be. So be careful of whom you choose to learn from.
PHP and MySQL (database) go together like peanut butter and jelly. I cannot tell you how important it is to learn these two languages together. MySQL may not be the "best" Database in the world but it is very easy to learn and very capable of building large scale applications.
So remember: if you're not "doing", you're not learning. Start learning PHP basics and make sure you're following along and trying to code your own small scripts when starting out. I know, I know... it LOOKS like it's too hard. It's not. This is not something you're going to learn overnight, but it's quite possible that you can learn enough to do what you need to do in just a matter of weeks!
Keep learning and continue doing.
Want to learn PHP at rapid speed? [http://learnbyvideo.blogspot.com/2007/11/learn-php-by-video.html]Check out these awesome Video Tutorials I've found!
If you're looking to become a PHP programmer - you need to see [http://learnbyvideo.blogspot.com/2007/11/learn-php-by-video.html]these videos!
Article Source: http://EzineArticles.com/?expert=Clint_Lenard http://EzineArticles.com/?How-to-Learn-PHP-and-MySQL-as-Quickly-as-Possible&id=819035
Wednesday, November 14, 2007
Introduction to PHP
Introduction to PHP
By [http://ezinearticles.com/?expert=Gagandeep_Singh_Tathgar]Gagandeep Singh Tathgar
What is PHP?
PHP stands for "PHP: HyperText Preprocessor". PHP is a server side scripting language for making dynamically driven websites. PHP written scripts can be used to keep track of your visitor’s activities on your site, send out emails to your subscribers, let your users upload files or images to your site, and drive the content on your site dynamically using databases. The possibilities are endless. Most of the social networking websites you visit are writing in PHP. Yep! PHP is that powerful.
What are PHP benefits?
PHP is a free open source language. That means you don't have to pay thousands of dollars in licensing fee to acquire PHP. Best of all, it is easy to install. The most striking feature of it is that it is easy to learn. PHP is used by millions of people and developers around the world. There are thousands of websites on the internet which are written using PHP. One primary example is Yahoo! Bookmarks.
What PHP can do for me?
PHP can greatly enhance the functionality of your website. It allows you to write scripts which let your visitors interact with you through your website. If you run a small business website, you can use PHP to let your users send you feed back to you on your products ad services or create a form which will allow your customers to send you emails, etc, etc.
Is PHP easy to learn?
Thou PHP will allow you to almost do anything complicated on your website. But you can implement simple forms or logic on your site very easily. At [http://php-learn-it.com]PHP-Learn-It.com, i explain some of those techniques with examples.
Article Source: http://EzineArticles.com/?expert=Gagandeep_Singh_Tathgar http://EzineArticles.com/?Introduction-to-PHP&id=556967
Posted By: Illusion Technologies
http://www.illusiontechnologies.com
By [http://ezinearticles.com/?expert=Gagandeep_Singh_Tathgar]Gagandeep Singh Tathgar
What is PHP?
PHP stands for "PHP: HyperText Preprocessor". PHP is a server side scripting language for making dynamically driven websites. PHP written scripts can be used to keep track of your visitor’s activities on your site, send out emails to your subscribers, let your users upload files or images to your site, and drive the content on your site dynamically using databases. The possibilities are endless. Most of the social networking websites you visit are writing in PHP. Yep! PHP is that powerful.
What are PHP benefits?
PHP is a free open source language. That means you don't have to pay thousands of dollars in licensing fee to acquire PHP. Best of all, it is easy to install. The most striking feature of it is that it is easy to learn. PHP is used by millions of people and developers around the world. There are thousands of websites on the internet which are written using PHP. One primary example is Yahoo! Bookmarks.
What PHP can do for me?
PHP can greatly enhance the functionality of your website. It allows you to write scripts which let your visitors interact with you through your website. If you run a small business website, you can use PHP to let your users send you feed back to you on your products ad services or create a form which will allow your customers to send you emails, etc, etc.
Is PHP easy to learn?
Thou PHP will allow you to almost do anything complicated on your website. But you can implement simple forms or logic on your site very easily. At [http://php-learn-it.com]PHP-Learn-It.com, i explain some of those techniques with examples.
Article Source: http://EzineArticles.com/?expert=Gagandeep_Singh_Tathgar http://EzineArticles.com/?Introduction-to-PHP&id=556967
Posted By: Illusion Technologies
http://www.illusiontechnologies.com
Friday, November 2, 2007
PHP Developers
Speeding PHP using APC PHP Cache
By [http://ezinearticles.com/?expert=Jon_Murray]Jon Murray
If you look at a PHP source file you will notice one thing. It's a source file. Not particularly surprising, but think about when you deploy a PHP application, what do you deploy? PHP source files. Now for many other languages; Java, C, etc when you deploy an application you deploy the compiled file. So, the question that you want to ask yourself is this, how much time does a PHP application spend compiling source files vs running the code? I'll answer that for you, a lot.
There are advantages to being able to deploy source files though. It makes it easy to do on the fly modifications or bug fixes to a program, much like we used to do in the early BASIC languages. Just change the file and the next time it's accessed your change is reflected. So, how do we keep the dynamic nature of PHP, but not recompile our files every time they are accessed?
A PHP cache. It's surprising to me that this concept isn't built into the base PHP engine, but perhaps that's because some company's can sell this add on to speed up PHP. Luckily for us, some companies/open source projects provide this plug in to PHP at no charge. These plug ins are generally known as PHP accelerators, some of them do some optimization and then caching and some only do caching. I'm not going to pass judgement on which one is the best, any of them are better than nothing, but I decided to use APC, the Alternative PHP Cache. I chose this one because it is still in active development and is open source and free.
Alternative php cache can be found at php.net, just look down the left column for APC. It comes in source form, so you will need to compile it before installing it, don't worry about that part. If you're using Red Hat 4 or CentOS4 I'll tell you exactly how to do it. If you're using something else, you'll need the same tools, but getting the tools might be a bit different.
1. The Tools
Do you know how many web sites, forums and blogs I went to with my error messages before I found the answers as to what I was missing when I was trying to install APC - Alternative PHP Cache? Two days worth, but I finally found the correct combination and it's really quite obvious as is everything once you know the answer. There are three sets of dev tools that you will need.
1a. You'll need a package called "Development Tools" this will include all the important dev tools like the GCC compiler, etc.
1b. You'll need a package called php-devel which as you might guess are development tools for PHP
1c. You'll need a package called httpd-devel which of course are dev tools for Apache web server.
On Red Hat or CentOS getting these should be as easy as the following 3 commands:
yum groupinstall "Development Tools"
yum install php-devel
yum install httpd-devel
You'll do these three one at a time and follow any instructions (usually just saying yes).
Now it's time to follow the instructions contained in the APC package. Since these may change over time I'm not going to go through them. They are very complete. If you follow the instructions and get an apc.so file out of it, then you're all set, just modify your php.ini file and you're good to go.
There are two problems that I encountered that you may encounter too. The first is an error when running phpize. I ignored this error and everything succeeded okay, but not before I spent hours looking for the solution to this error. Here is the error.
configure.in:9: warning: underquoted definition of PHP_WITH_PHP_CONFIG
run info '(automake)Extending aclocal'
or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.in:32: warning: underquoted definition of PHP_EXT_BUILDDIR
configure.in:33: warning: underquoted definition of PHP_EXT_DIR
configure.in:34: warning: underquoted definition of PHP_EXT_SRCDIR
configure.in:35: warning: underquoted definition of PHP_ALWAYS_SHARED
acinclude.m4:19: warning: underquoted definition of PHP_PROG_RE2C
People would have had me updating my PHP version from 4.3.9 and everything else under the sun to get rid of this error, but in the end it didn't matter. My APC compiled and installed nicely and I am good to go.
The other slight problem that I ran into was the location of php-config. The install instructions wanted me to do the following:
./configure --enable-apc-mmap --with-apxs --with-php-config=/usr/local/php/bin/php-config
However my php-config is in /usr/bin/php-config. Making that change allowed this part to work.
So, have at it, once it's done you can expect to see huge improvements in your web site response times and reductions on your CPU load. One more quick note, My server hosts about 20 web sites, but only 3 or 4 are really busy. To reduce the memory footprint of caching everything for all 20 sites I used the apc.filters property. Although this property is slightly flawed for non qualified includes, it worked nicely for my Serendipity blogs. Your mileage with this property will vary according to the software you are using and how it does it's includes.
Jon runs UFC fan site [http://www.ufcresultslive.com/categories/39-UFC-Results/]UFC Results come to UFC Results at http://www.ufcresultslive.com for UFC Results, Predictions, News and of course Fighter Rankings.
Article Source: http://EzineArticles.com/?expert=Jon_Murray http://EzineArticles.com/?Speeding-PHP-using-APC-PHP-Cache&id=800655
Posted By: Illusion Technologies
http://www.illusiontechnologies.com
By [http://ezinearticles.com/?expert=Jon_Murray]Jon Murray
If you look at a PHP source file you will notice one thing. It's a source file. Not particularly surprising, but think about when you deploy a PHP application, what do you deploy? PHP source files. Now for many other languages; Java, C, etc when you deploy an application you deploy the compiled file. So, the question that you want to ask yourself is this, how much time does a PHP application spend compiling source files vs running the code? I'll answer that for you, a lot.
There are advantages to being able to deploy source files though. It makes it easy to do on the fly modifications or bug fixes to a program, much like we used to do in the early BASIC languages. Just change the file and the next time it's accessed your change is reflected. So, how do we keep the dynamic nature of PHP, but not recompile our files every time they are accessed?
A PHP cache. It's surprising to me that this concept isn't built into the base PHP engine, but perhaps that's because some company's can sell this add on to speed up PHP. Luckily for us, some companies/open source projects provide this plug in to PHP at no charge. These plug ins are generally known as PHP accelerators, some of them do some optimization and then caching and some only do caching. I'm not going to pass judgement on which one is the best, any of them are better than nothing, but I decided to use APC, the Alternative PHP Cache. I chose this one because it is still in active development and is open source and free.
Alternative php cache can be found at php.net, just look down the left column for APC. It comes in source form, so you will need to compile it before installing it, don't worry about that part. If you're using Red Hat 4 or CentOS4 I'll tell you exactly how to do it. If you're using something else, you'll need the same tools, but getting the tools might be a bit different.
1. The Tools
Do you know how many web sites, forums and blogs I went to with my error messages before I found the answers as to what I was missing when I was trying to install APC - Alternative PHP Cache? Two days worth, but I finally found the correct combination and it's really quite obvious as is everything once you know the answer. There are three sets of dev tools that you will need.
1a. You'll need a package called "Development Tools" this will include all the important dev tools like the GCC compiler, etc.
1b. You'll need a package called php-devel which as you might guess are development tools for PHP
1c. You'll need a package called httpd-devel which of course are dev tools for Apache web server.
On Red Hat or CentOS getting these should be as easy as the following 3 commands:
yum groupinstall "Development Tools"
yum install php-devel
yum install httpd-devel
You'll do these three one at a time and follow any instructions (usually just saying yes).
Now it's time to follow the instructions contained in the APC package. Since these may change over time I'm not going to go through them. They are very complete. If you follow the instructions and get an apc.so file out of it, then you're all set, just modify your php.ini file and you're good to go.
There are two problems that I encountered that you may encounter too. The first is an error when running phpize. I ignored this error and everything succeeded okay, but not before I spent hours looking for the solution to this error. Here is the error.
configure.in:9: warning: underquoted definition of PHP_WITH_PHP_CONFIG
run info '(automake)Extending aclocal'
or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.in:32: warning: underquoted definition of PHP_EXT_BUILDDIR
configure.in:33: warning: underquoted definition of PHP_EXT_DIR
configure.in:34: warning: underquoted definition of PHP_EXT_SRCDIR
configure.in:35: warning: underquoted definition of PHP_ALWAYS_SHARED
acinclude.m4:19: warning: underquoted definition of PHP_PROG_RE2C
People would have had me updating my PHP version from 4.3.9 and everything else under the sun to get rid of this error, but in the end it didn't matter. My APC compiled and installed nicely and I am good to go.
The other slight problem that I ran into was the location of php-config. The install instructions wanted me to do the following:
./configure --enable-apc-mmap --with-apxs --with-php-config=/usr/local/php/bin/php-config
However my php-config is in /usr/bin/php-config. Making that change allowed this part to work.
So, have at it, once it's done you can expect to see huge improvements in your web site response times and reductions on your CPU load. One more quick note, My server hosts about 20 web sites, but only 3 or 4 are really busy. To reduce the memory footprint of caching everything for all 20 sites I used the apc.filters property. Although this property is slightly flawed for non qualified includes, it worked nicely for my Serendipity blogs. Your mileage with this property will vary according to the software you are using and how it does it's includes.
Jon runs UFC fan site [http://www.ufcresultslive.com/categories/39-UFC-Results/]UFC Results come to UFC Results at http://www.ufcresultslive.com for UFC Results, Predictions, News and of course Fighter Rankings.
Article Source: http://EzineArticles.com/?expert=Jon_Murray http://EzineArticles.com/?Speeding-PHP-using-APC-PHP-Cache&id=800655
Posted By: Illusion Technologies
http://www.illusiontechnologies.com
Wednesday, October 31, 2007
PHP Developers
How to Implement CAPTCHA With PHP and GD
By [http://ezinearticles.com/?expert=Andrew_Ivanov]Andrew Ivanov
So, you have a public submission form on your website (contact page, forum submission,blogs comment form) and need to prevent spam by auto-submitters. Common way to do this is to implement CAPTCHA - an image with randomly generated string
(quote from Wikipedia, free online enciclopedia: “A CAPTCHA is a type of challenge-response test used in computing to determine whether the user is human. "CAPTCHA" is an acronym for "Completely Automated Public Turing test to tell Computers and Humans Apart", trademarked by Carnegie Mellon University.”)
Simple, quick and efficient PHP solution for implemet CAPTCHA:
the advantage of this solution: it is easy to read symbols by human and automated captcha processor software, but hard to process the image by computer because common CAPTCHA processors can't understand which one of the outputted symbols it must ignore!
obviously you need PHP engine enabled for your webserver, for execute PHP scripts, and GD (PHP graphics library) for generate the image. Webserver, PHP and GD versions are no matter, the solution below is tested for Apache(Windows and Unix), IIS(Windows), PHP-4, PHP-5, GD, GD2
1) Make a PHP script (separate file captcha.php) which will generate the CAPTCHA image:
[?php
session_start();
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
function _generateRandom($length=6){
$_rand_src = array(
array(48,57) //digits
, array(97,122) //lowercase chars
// , array(65,90) //uppercase chars
);
srand ((double) microtime() * 1000000);
$random_string = "";
for($i=0;$i
By [http://ezinearticles.com/?expert=Andrew_Ivanov]Andrew Ivanov
So, you have a public submission form on your website (contact page, forum submission,blogs comment form) and need to prevent spam by auto-submitters. Common way to do this is to implement CAPTCHA - an image with randomly generated string
(quote from Wikipedia, free online enciclopedia: “A CAPTCHA is a type of challenge-response test used in computing to determine whether the user is human. "CAPTCHA" is an acronym for "Completely Automated Public Turing test to tell Computers and Humans Apart", trademarked by Carnegie Mellon University.”)
Simple, quick and efficient PHP solution for implemet CAPTCHA:
the advantage of this solution: it is easy to read symbols by human and automated captcha processor software, but hard to process the image by computer because common CAPTCHA processors can't understand which one of the outputted symbols it must ignore!
obviously you need PHP engine enabled for your webserver, for execute PHP scripts, and GD (PHP graphics library) for generate the image. Webserver, PHP and GD versions are no matter, the solution below is tested for Apache(Windows and Unix), IIS(Windows), PHP-4, PHP-5, GD, GD2
1) Make a PHP script (separate file captcha.php) which will generate the CAPTCHA image:
[?php
session_start();
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
function _generateRandom($length=6){
$_rand_src = array(
array(48,57) //digits
, array(97,122) //lowercase chars
// , array(65,90) //uppercase chars
);
srand ((double) microtime() * 1000000);
$random_string = "";
for($i=0;$i
Monday, October 29, 2007
PHP Developers
Choose Wisely: PHP Templates and Search Engine Rank
By [http://ezinearticles.com/?expert=Jacob_Filipp]Jacob Filipp
This article is intended for PHP web developers who create template systems for consistently presenting website content. PHP designers who create their own template systems should be concerned about how their choices affect the website's position in search engines. Below is a discussion of three types of systems, their impact on search ranking and a recommendation for the best approach.
Webpage as a CGI Argument
In this architecture one PHP script contains the entire template, and plugs in content from a file it reads in - getting the file name from a CGI parameter. These types of systems are not only prone to security problems (as users can modify the path argument to retrieve arbitrary files) but are also ineffective for search engine optimization.
This particular design does not allow for titles and keyword/description meta-tags to be associated with individual pages. This is because the header portion of the template includes the section within it, and only allows for one site-wide title and set of meta-tags. Titles are one of the most important page elements, and having one title - unrelated to the actual content retrieved - results in a lower rank in search engines.
There are two other detrimental SEO effects this type of system has. The first is that each unique page is viewed as an aspect of the template script, rather than as a unique standalone page. This can result in search engines lowering the importance of individual content pages relative to the template script - which is often not the desired result. The other weakness of this approach is that having individual pages set up as CGI arguments makes site metrics harder to track, as statistics often show a visit to a specific page as a visit to the general template script. The popular web statistics packages AWstats and Webalizer are most affected by this.
However, this type of templating system is popular and sucessfully used in the world of e-commerce. In such systems, product information is stored in a database and is inserted into the template when a product is requested by its code. This means that both a unique title and a set of meta-tags can be stored alongside the product data (or generated on the fly), and inserted into the global template effectively. The only detrimental effects that remain are the latter mentioned two, and are usually an acceptable tradeoff for the increased ease of administration that a database-driven system provides.
Template as an Include
In this architecture, each page on the website has its own filename with a .php extension. The top and bottom portions of the template are stored in separate files that are included (using include_once() ) by each content file. This technique increases the importance of the page with search engines, as each page is its own standalone page rather than a CGI argument. This type of template system also makes it simple to track page views through regular website statistics software.
On the other hand, this type of template system still has the weakness of having one title and one set of meta-tags for the entire site. This is, again, because the header portion of templates has to include everything from the opening of the tag to the end of the code for the header portion of the template. And this area includes the title and meta-tags. One workaround for this type of system is to code the top template page to check which file it is being called from, and to substitute a suitable pre-coded title. Although effective, such a system is cumbersome to maintain as each new page that is published warrants a new title and meta-tag entry in this secondary system.
Body-Only Includes
The ideal PHP templating system will permit content producers to enjoy the reusability of templates, while maintaining unique titles and metadata for each page with ease. The system that meets all of these SEO needs is a "body-only include" system: a system where each php content page includes the top and bottom portions of the template (as in the previous approach), but only includes the elements below the body tag. This translates into a document that has its own html, head, title and meta tags, has an include_once() statement which is called at the top of the body element and includes the top portion of the template, has the content, and an include for the footer portion of the template. Such a system allows for individual editing of the title and meta-information during the creation of documents and solves the problems that both of the aforementioned systems face.
I find this system the most search-engine friendly, because it keeps the title information and the content together - allowing for the presence of relevant, unique titles for each page. This system is also the most human friendly, as storing the title information in the same file as the page content allows for fast updating and avoids maintaining a second "workaround" system that attempts to match titles to content.
Conclusion
The types of template system that PHP developers choose to implement for clients' sites have a crucial impact on the future search-engine popularity of the client's webpages. Important factors to consider when developing a template solution are: relevant titles tied to content, relevant meta-tags, standalone files and ease of statistics tracking. The popular approaches of page-as-an-argument and template-as-an-include do not effectively provide these functions. Including template information after the body tag, and keeping headers intact is the best way to ensure that sites are optimized for search engines - and this is why you should consider using the Body-Only Includes model during your next project.
Jacob Filipp is a Canadian search engine optimization specialist at [http://powerspiritonline.com/contact.html]Powerspirit. Jacob has 7 years of experience as a web developer and webmaster.
Article Source: http://EzineArticles.com/?expert=Jacob_Filipp http://EzineArticles.com/?Choose-Wisely:-PHP-Templates-and-Search-Engine-Rank&id=597857
By [http://ezinearticles.com/?expert=Jacob_Filipp]Jacob Filipp
This article is intended for PHP web developers who create template systems for consistently presenting website content. PHP designers who create their own template systems should be concerned about how their choices affect the website's position in search engines. Below is a discussion of three types of systems, their impact on search ranking and a recommendation for the best approach.
Webpage as a CGI Argument
In this architecture one PHP script contains the entire template, and plugs in content from a file it reads in - getting the file name from a CGI parameter. These types of systems are not only prone to security problems (as users can modify the path argument to retrieve arbitrary files) but are also ineffective for search engine optimization.
This particular design does not allow for titles and keyword/description meta-tags to be associated with individual pages. This is because the header portion of the template includes the section within it, and only allows for one site-wide title and set of meta-tags. Titles are one of the most important page elements, and having one title - unrelated to the actual content retrieved - results in a lower rank in search engines.
There are two other detrimental SEO effects this type of system has. The first is that each unique page is viewed as an aspect of the template script, rather than as a unique standalone page. This can result in search engines lowering the importance of individual content pages relative to the template script - which is often not the desired result. The other weakness of this approach is that having individual pages set up as CGI arguments makes site metrics harder to track, as statistics often show a visit to a specific page as a visit to the general template script. The popular web statistics packages AWstats and Webalizer are most affected by this.
However, this type of templating system is popular and sucessfully used in the world of e-commerce. In such systems, product information is stored in a database and is inserted into the template when a product is requested by its code. This means that both a unique title and a set of meta-tags can be stored alongside the product data (or generated on the fly), and inserted into the global template effectively. The only detrimental effects that remain are the latter mentioned two, and are usually an acceptable tradeoff for the increased ease of administration that a database-driven system provides.
Template as an Include
In this architecture, each page on the website has its own filename with a .php extension. The top and bottom portions of the template are stored in separate files that are included (using include_once() ) by each content file. This technique increases the importance of the page with search engines, as each page is its own standalone page rather than a CGI argument. This type of template system also makes it simple to track page views through regular website statistics software.
On the other hand, this type of template system still has the weakness of having one title and one set of meta-tags for the entire site. This is, again, because the header portion of templates has to include everything from the opening of the tag to the end of the code for the header portion of the template. And this area includes the title and meta-tags. One workaround for this type of system is to code the top template page to check which file it is being called from, and to substitute a suitable pre-coded title. Although effective, such a system is cumbersome to maintain as each new page that is published warrants a new title and meta-tag entry in this secondary system.
Body-Only Includes
The ideal PHP templating system will permit content producers to enjoy the reusability of templates, while maintaining unique titles and metadata for each page with ease. The system that meets all of these SEO needs is a "body-only include" system: a system where each php content page includes the top and bottom portions of the template (as in the previous approach), but only includes the elements below the body tag. This translates into a document that has its own html, head, title and meta tags, has an include_once() statement which is called at the top of the body element and includes the top portion of the template, has the content, and an include for the footer portion of the template. Such a system allows for individual editing of the title and meta-information during the creation of documents and solves the problems that both of the aforementioned systems face.
I find this system the most search-engine friendly, because it keeps the title information and the content together - allowing for the presence of relevant, unique titles for each page. This system is also the most human friendly, as storing the title information in the same file as the page content allows for fast updating and avoids maintaining a second "workaround" system that attempts to match titles to content.
Conclusion
The types of template system that PHP developers choose to implement for clients' sites have a crucial impact on the future search-engine popularity of the client's webpages. Important factors to consider when developing a template solution are: relevant titles tied to content, relevant meta-tags, standalone files and ease of statistics tracking. The popular approaches of page-as-an-argument and template-as-an-include do not effectively provide these functions. Including template information after the body tag, and keeping headers intact is the best way to ensure that sites are optimized for search engines - and this is why you should consider using the Body-Only Includes model during your next project.
Jacob Filipp is a Canadian search engine optimization specialist at [http://powerspiritonline.com/contact.html]Powerspirit. Jacob has 7 years of experience as a web developer and webmaster.
Article Source: http://EzineArticles.com/?expert=Jacob_Filipp http://EzineArticles.com/?Choose-Wisely:-PHP-Templates-and-Search-Engine-Rank&id=597857
Saturday, October 27, 2007
PHP Developers
SQL Server ASP Websites - First Steps for Novice Developers
By [http://ezinearticles.com/?expert=Margaret_Cruise_O'Brien]Margaret Cruise O'Brien
Database-Driven Websites
Ten years ago, novice web developers worked hard to create static websites with HTML and perhaps a bit of Javascript to spice up the action. Now, novice developers are starting with database-driven web pages that let web site visitors enter data and view dynamic content. When you're learning, it's important to start small and work your way up to large complex sites. So where should the novice developer start?
Your First Web Database Application
To keep motivated, you should choose a small project that will actually be useful. A great candidate is the opt-in page: a web page that lets visitors provide their name and email address to be saved to the website database. Presumably the website owner will use this data to send out newsletters and email marketing, but we won't worry about that! This is the perfect training application: a simple but useful one-page database application.
Choosing Your Tools - the Microsoft option
Once you've decided what you're going to develop, you need to decide which tools to develop with. If you're on a budget (and who isn't), then Microsoft has released a development environment available for free. You can download and install Visual Web Developer Express from the Microsoft website, which also comes with a free version of the popular database engine Microsoft SQL Server. The free database is branded as SQL Server Express.
There are other free alternatives open to you - MySQL and PHP has traditionally been a popular choice. If you come from a Linux or Unix background, you'll probably want to go that route, but if you are used to working on Windows machines, then the Microsoft option is appealing.
Creating the Table
For the simple opt-in application, you need a database table that will store names and their email addresses - this is about as simple as it gets. Visual Web Developer Express provides a GUI to let you create tables. For this project, you'll be creating a three-column table. Of course, you need one column to store the visitor's name, and another to store the email address. So why the third?
For proper database design, you should also have a unique ID column within the table that is defined as a primary key and set as an identity field. If this terminology is alien to you, you'll need to read some tutorials on SQL and creating tables. You will find lots of online articles, including [http://www.salmontraining.com/sqlexpresszone/index.html]step-by-step walk-throughs on the process. The work you put into learning basic table creation at this stage will be invaluable for future web projects!
Creating the Web Page
The opt-in web page needs to provide two input boxes to allow the visitor to enter a name and email address. If you've already done a bit of HTML coding, that's no problem to you. The tricky bit is connecting the page to the database and ensuring that the details are written to the table.
This is where Visual Web Developer Express comes into its own. With alternative programming languages, this would take lines of code to put together (and hours of debugging when it doesn't work!). With VWD Express, you use the GUI interface and wizards to drag-and-drop ASP.Net controls to access the database - the tool creates the code you need behind the scenes.
Finding a Hosting Provider
In order to go live, your hosting provider must support ASP.Net and SQL Server. Shop around - there are a number of competing providers out there. If you're working on a budget, then you'll find Go Daddy hard to beat.
Going Live
Getting things working on your laptop or PC is a great achievement! But putting your database application live is real success.
If what's been described up to now sounds too easy - well, the development process is relatively simple with the Microsoft ASP.Net development environment. The Microsoft tools hide much of the complexity of database development.
Unfortunately, developers can hit a roadblock when they try to put their new web application live on a hosted site. Getting the web page to connect to the live database is the first hurdle as the hosting provider will most likely be using SQL Server Enterprise, the big brother of the database on the local laptop or PC. Hosting providers may insist that developers use their own Control Panel to work with the database and create the database table.
Persevere! A bit of time and effort spent going live is worth the feeling of achievement when your first website visitor enters details into the web page and the data flows successfully to the live database!
Margaret Cruise O'Brien is a database consultant, and founder of [http://www.salmontraining.com]Salmon Training Check out our website for training on [http://www.salmontraining.com/sqlexpresszone/going_live_with_vwd_and_sqlexpress.aspx]going live on Go Daddy with a simple ASP.Net SQL Server application
Article Source: http://EzineArticles.com/?expert=Margaret_Cruise_O'Brien http://EzineArticles.com/?SQL-Server-ASP-Websites---First-Steps-for-Novice-Developers&id=684430
By [http://ezinearticles.com/?expert=Margaret_Cruise_O'Brien]Margaret Cruise O'Brien
Database-Driven Websites
Ten years ago, novice web developers worked hard to create static websites with HTML and perhaps a bit of Javascript to spice up the action. Now, novice developers are starting with database-driven web pages that let web site visitors enter data and view dynamic content. When you're learning, it's important to start small and work your way up to large complex sites. So where should the novice developer start?
Your First Web Database Application
To keep motivated, you should choose a small project that will actually be useful. A great candidate is the opt-in page: a web page that lets visitors provide their name and email address to be saved to the website database. Presumably the website owner will use this data to send out newsletters and email marketing, but we won't worry about that! This is the perfect training application: a simple but useful one-page database application.
Choosing Your Tools - the Microsoft option
Once you've decided what you're going to develop, you need to decide which tools to develop with. If you're on a budget (and who isn't), then Microsoft has released a development environment available for free. You can download and install Visual Web Developer Express from the Microsoft website, which also comes with a free version of the popular database engine Microsoft SQL Server. The free database is branded as SQL Server Express.
There are other free alternatives open to you - MySQL and PHP has traditionally been a popular choice. If you come from a Linux or Unix background, you'll probably want to go that route, but if you are used to working on Windows machines, then the Microsoft option is appealing.
Creating the Table
For the simple opt-in application, you need a database table that will store names and their email addresses - this is about as simple as it gets. Visual Web Developer Express provides a GUI to let you create tables. For this project, you'll be creating a three-column table. Of course, you need one column to store the visitor's name, and another to store the email address. So why the third?
For proper database design, you should also have a unique ID column within the table that is defined as a primary key and set as an identity field. If this terminology is alien to you, you'll need to read some tutorials on SQL and creating tables. You will find lots of online articles, including [http://www.salmontraining.com/sqlexpresszone/index.html]step-by-step walk-throughs on the process. The work you put into learning basic table creation at this stage will be invaluable for future web projects!
Creating the Web Page
The opt-in web page needs to provide two input boxes to allow the visitor to enter a name and email address. If you've already done a bit of HTML coding, that's no problem to you. The tricky bit is connecting the page to the database and ensuring that the details are written to the table.
This is where Visual Web Developer Express comes into its own. With alternative programming languages, this would take lines of code to put together (and hours of debugging when it doesn't work!). With VWD Express, you use the GUI interface and wizards to drag-and-drop ASP.Net controls to access the database - the tool creates the code you need behind the scenes.
Finding a Hosting Provider
In order to go live, your hosting provider must support ASP.Net and SQL Server. Shop around - there are a number of competing providers out there. If you're working on a budget, then you'll find Go Daddy hard to beat.
Going Live
Getting things working on your laptop or PC is a great achievement! But putting your database application live is real success.
If what's been described up to now sounds too easy - well, the development process is relatively simple with the Microsoft ASP.Net development environment. The Microsoft tools hide much of the complexity of database development.
Unfortunately, developers can hit a roadblock when they try to put their new web application live on a hosted site. Getting the web page to connect to the live database is the first hurdle as the hosting provider will most likely be using SQL Server Enterprise, the big brother of the database on the local laptop or PC. Hosting providers may insist that developers use their own Control Panel to work with the database and create the database table.
Persevere! A bit of time and effort spent going live is worth the feeling of achievement when your first website visitor enters details into the web page and the data flows successfully to the live database!
Margaret Cruise O'Brien is a database consultant, and founder of [http://www.salmontraining.com]Salmon Training Check out our website for training on [http://www.salmontraining.com/sqlexpresszone/going_live_with_vwd_and_sqlexpress.aspx]going live on Go Daddy with a simple ASP.Net SQL Server application
Article Source: http://EzineArticles.com/?expert=Margaret_Cruise_O'Brien http://EzineArticles.com/?SQL-Server-ASP-Websites---First-Steps-for-Novice-Developers&id=684430
Subscribe to:
Posts (Atom)