PHP Logic

August 14, 2008

If else statements

Let’s look at an example

if ($lesson = “html”) {
echo “Welcome to html”;
}

The above statement tells php to display Welcome to html if our Lesson variable is equal to html.
The condition is always stated next to the if in () . The results are stated after the { and } tells php that you are ending the if statement.

Next let’s look at an else example

if ($lesson = “html”) {
echo “Welcome to html”;
}
elseif ($lesson = “php”) {
echo “Welcome to php”;
}
else {
echo “No lesson chosen”;
}

Else statement came after an if statement. Notice else came in elseif and else formate. Elseif looks for other conditions if they existed. Else is the result as a last resort, if no other option is available. Both elseif and else follow the same structure as if statements.

Next , we’ll talk about loops statments

The first type of loop statements are while statements

Let’s look at an example below

$ls = 0;
while ($ls < 5) {
echo “$lesson” ;
$ls++;
}

While statement are used to loop through a collection of records or data. The above statement simply at the number of our $ls variable and from that number prints the chosen lesson. Again following the same structure as if else statements, condition next to the while and condition below { and ending with . The only differences is we incremented the variable within the statement.

Next we’ll discuss for statements

For statements are used in the same essence as while statment, expect more emphasis is put on the variable as you’ll in the example below.

for ($ls=0;$ls<$totalls;$ls++)
{
echo $ls['lesson'];
}

The above example, declares the ls variable again and compares it to total numbers of lessons. While ls is less than total number of lessons, we tell php to increment. Again following the same structure as if else statements, condition next to the for and condition below { and ending with } .

Source : http://www.articlecity.com
Author : Izzat Youssif is an online web designer and developer offering low cost website design and development service, as well as free website design and development. visit http://websitedevelopmentanddesign.com for more details!

Mastering Regular Expressions in PHP

August 14, 2008

What are Regular Expressions?

A regular expression is a pattern that can match various text strings. Using regular expressions you can find (and replace) certain text patterns, for example “all the words that begin with the letter A” or “find only telephone numbers”. Regular expressions are often used in validation classes, because they are a really powerful tool to verify e-mail addresses, telephone numbers, street addresses, zip codes, and more.

In this tutorial I will show you how regular expressions work in PHP, and give you a short introduction on writing your own regular expressions. I will also give you several example regular expressions that are often used.

Regular Expressions in PHP

Using regex (regular expressions) is really easy in PHP, and there are several functions that exist to do regex finding and replacing. Let’s start with a simple regex find.

Have a look at the documentation of the preg_match function (http://php.net/preg_match). As you can see from the documentation, preg_match is used to perform a regular expression. In this case no replacing is done, only a simple find. Copy the code below to give it a try.

<?php

// Example string
$str = "Let's find the stuff <bla>in between</bla> these two previous brackets";

// Let's perform the regex
$do = preg_match("/<bla>(.*)<\/bla>/", $str, $matches);

// Check if regex was successful
if ($do = true) {
	// Matched something, show the matched string
	echo htmlentities($matches['0']);

	// Also how the text in between the tags
	echo '<br />' . $matches['1'];
} else {
	// No Match
	echo "Couldn't find a match";
}

?>

After having run the code, it’s probably a good idea if I do a quick run through the code. Basically, the whole core of the above code is the line that contains the preg_match. The first argument is your regex pattern. This is probably the most important. Later on in this tutorial, I will explain some basic regular expressions, but if you really want to learn regular expression then it’s best if you look on Google for specific regular expression examples.

The second argument is the subject string. I assume that needs no explaining. Finally, the third argument can be optional, but if you want to get the matched text, or the text in between something, it’s a good idea to use it (just like I used it in the example).

The preg_match function stops after it has found the first match. If you want to find ALL matches in a string, you need to use the preg_match_all function (http://www.php.net/preg_match_all). That works pretty much the same, so there is no need to separately explain it.

Now that we’ve had finding, let’s do a find-and-replace, with the preg_replace function (http://www.php.net/preg_replace). The preg_replace function works pretty similar to the preg_match function, but instead there is another argument for the replacement string. Copy the code below, and run it.

<?php

// Example string
$str = "Let's replace the <bla>stuff between</bla> the bla brackets";

// Do the preg replace
$result = preg_replace ("/<bla>(.*)<\/bla>/", "<bla>new stuff</bla>", $str);

echo htmlentities($result);
?>

The result would then be the same string, except it would now say ‘new stuff’ between the bla tags. This is of course just a simple example, and more advanced replacements can be done.

You can also use keys in the replacement string. Say you still want the text between the brackets, and just add something? You use the $1, $2, etc keys for those. For example:

<?php

// Example string
$str = "Let's replace the <bla>stuff between</bla> the bla brackets";

// Do the preg replace
$result = preg_replace ("/<bla>(.*)<\/bla>/", "<bla>new stuff (the old: $1)</bla>", $str);

echo htmlentities($result);
?>

This would then print “Let’s replace the new stuff (the old: stuff between) the bla brackets”. $2 is for the second “catch-all”, $3 for the third, etc.

That’s about it for regular expressions. It seems very difficult, but once you grasp it is extremely easy yet one of the most powerful tools when programming in PHP. I can’t count the number of times regex has saved me from hours of coding difficult text functions.

An Example

What would a good tutorial be without some real examples? Let’s first have a look at a simple e-mail validation function. An e-mail address must start with letters or numbers, then have a @, then a domain, ending with an extension. The regex for that would be something like this: ^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$

Let me quickly explain that regex. Basically, the first part says that it must all be letters or numbers. Then we get the @, and after that there should be letters and/or numbers again (the domain). Finally we check for a period, and then for an extension. The code to use this regex looks like this:

<?php

// Good e-mail
$good = "john@example.com";

// Bad e-mail
$bad = "blabla@blabla";

// Let's check the good e-mail
if (preg_match("/^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$/", $good)) {
	echo "Valid e-mail";
} else {
	echo "Invalid e-mail";
}

echo '<br />';

// And check the bad e-mail
if (preg_match("/^[a-zA-Z0-9_\.\-]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$/", $bad)) {
	echo "Valid e-mail";
} else {
	echo "Invalid e-mail";
}

?>

The result of this would be “Valid E-mail. Invalid E-mail”, of course. We have just checked if an e-mail address is valid. If you wrap the above code in a function, you’ve got yourself a e-mail validation function. Keep in mind though that the regex isn’t perfect: after all, it doesn’t check whether the extension is too long, does it? Because I want to keep this tutorial short, I won’t give the full fledged regex, but you can find it easily via Google.

Another Example

Another great example would be a telephone number. Say you want to verify telephone numbers and make sure they were in the correct format. Let’s assume you want the numbers to be in the format of xxx-xxxxxxx. The code would look something like this:

<?php

// Good number
$good = "123-4567890";

// Bad number
$bad = "45-3423423";

// Let's check the good number
if (preg_match("/\d{3}-\d{7}/", $good)) {
	echo "Valid number";
} else {
	echo "Invalid number";
}

echo '<br />';

// And check the bad number
if (preg_match("/\d{3}-\d{7}/", $bad)) {
	echo "Valid number";
} else {
	echo "Invalid number";
}

?>

The regex is fairly simple, because we use \d. This basically means “match any digit” with the length behind it. In this example it first looks for 3 digits, then a ‘-’ (hyphen) and finally 7 digits. Works perfectly, and does exactly what we want.

What exactly is possible with Regular Expressions?

Regular expressions are actually one of the most powerful tools in PHP, or any other language for that matter (you can use it in your mod_rewrite rules as well!). There is so much you can do with regex, and we’ve only scratched the surface in this tutorial with some very basic examples.

If you really want to dig into regex I suggest you search on Google for more tutorials, and try to learn the regex syntax. It isn’t easy, and there’s quite a steep learning curve (in my opinion), but the best way to learn is to go through a lot of examples, and try to translate them in plain English. It really helps you learn the syntax.

In the future I will dedicate a complete article to strictly examples, including more advanced ones, without any explanation. But for now, I can only give you links to other tutorials:

The 30 Minute Regex Tutorial (http://www.codeproject.com/dotnet/RegexTutorial.asp)

Regular-Expressions.info (http://www.regular-expressions.info/)

Source : http://www.articlecity.com

Author : Dennis Pallett is a young tech writer, with much experience in ASP, PHP and other web technologies. He enjoys writing, and has written several articles and tutorials. To find more of his work, look at his websites at http://www.phpit.net, http://www.aspit.net and http://www.webdev-articles.com dennis@nocertainty.com

The New Wave Of Communication

August 11, 2008

AIR TRAVEL. Television. THE WORLD WIDE WEB.
Each of these cultural advances was once seen by some as a passing fad. But as everyone now is well aware, these once- new ways to travel, be entertained and communicate have become firmly integrated into American society. The reason for their staying power? Simply put, they make people’s lives easier by making the world smaller.
So what’s next? Which new development will revolutionize the way we communicate?
The answer is already here, and it’s in the form of cutting- edge digital phone service. Voice over Internet Protocol (Voip) brings the telephone and the Internet together to streamline personal and business communication. By doing away with the traditional phone line. Voip offers exceptional quality at a at a fraction of traditional phone service rates. voip delivers reliable, crystal-clear sound to anywhere broadband internet service is available. And that’s not all. Voip technology also enables calls to be transmitted in real- time video.
Once only seen on the Jetsons and other futuristic TV shows and movies, the Videophone is finally part of the here and now.
VoIP- EASY TO USE
If you tend to get intimidated by technological talk, dont worry. The way VoIP works is quite simple. Using a broadband Internet connection instead of a regular phone line to carry telephone calls, VOIP works by converting the voice signal from your telephone into a digital signal that can travel over the internet. If you are calling regular telephone number, the signal is converted back at the other end. you can use VOIP service through a special VOIP telephone, a regular telephone with an adapter or through your computer using a microphone. If your friends and family members don’t have VOIP, they can still call you and recieve calls from you using their regular telephones.
What does VOIP technology mean for the future of communication? As more people learn about and utilize Voip, more advantages are being discovered. One of the most talked-about benifits is the huge savings available through VoIP. While traditional phone companies must operate older less sophisticated equipment, VoIP providers have much lower operating cost. As a result, VoIP providers can charge significantly less than their traditional competitors. Depending on your service, VoIP can cost half of what phone customers typically pay for regular phone service, and features such as call waiting, voice mail and Caller ID are included with the service instead of being tacked on as “extras.”
MAKING BUSINESS MORE EFFICIENT
This cost-effective method of communication translates into a streamlined way to do business. According to Entreprenuer magazine, VoIP frees businesses from having to maintain separate networks for phones and data, which is another big money saver. Through its VideoPhone capabilities, VoIP offers real-time, high-quality videoconferencing.
For business owners working from home, VoIP’s ability to transmit more than one telephone call over the same broadband connection makes VoIP a simple way to add and extra phone line to a home office. And if your business requires you to make frequent calls to other countries, VoIP is the way to go. Because VoIP is location-independent, businesses can keep in touch with clients from anywhere in the world. Using broadband Internet instead of regular phone lines, VoIP users can save hundreds of dollars each month on international calls. Because of the service’s videoconferencing function, travel for international business can also be reduced, resulting in profound savings in travel funds. These are portable savings. too, because VoIP calling devices can be transported around the globe. Imagine being in close contact with all your business associates, no matter where you go !
The system’s technology also offers benefits at home. Grandparents living on the other side of the world can still have face-to-face interaction with their grandchildren through the VideoPhone function. VoIP technology has even kept families close who have been separated by war. VoIP is not only the wave of the future, it’s today’s new way to communicate. Millions are already opening up their lives and businesses to the possibilities VoIP has to offer.

Jason Carter is the creator of this article. I own a part of fortune 500 company, that help people save money on their telecommunication bills.

Article Source: http://www.ArticleBiz.com

Internet Business-Is it really that Easy?

August 11, 2008

Is Internet Business Easy?
The short answer is…YES…and No! It depends on the type of person you are!
If you are already making big money on line, then you have already mastered the art of marketing and promotion amongst other skills; if this is you, then YES it is Easy! (You have the know-how!) If you are just starting out in an Internet Business or you are looking to jump aboard the WWW train, then read on and go in with your eyes wide open!
The Internet is full of promises. The fact is that over 1 Billion dollars is spent on the Internet daily. Yes! Over 1 billion every day! Anyone with a computer can get a piece of the pie…if you know how.
There are all sorts of ways people get into business on line; most start with Affiliate Marketing because you don’t need money, a product or a web site.
(Search for Affiliate Networks to get an overview of Affiliate Marketing) But as you learn more, you soon realize that to be really successful (even with affiliate marketing) you do need your own website. You need your own flavour; your own individual style! But most of all, you need to educate yourself.
(You need all sorts of things really…that will be the topic of my next article)
The point of this article is that if you are going to go into an Internet Business or any other business for that matter, you need to do your research and find out the ins and outs. You need to determine whether the industry is right for you and whether or not you are committed enough to learn all the relevant aspects of doing business in a new field or industry. Spend your time and do your homework thoroughly…are you serious or are you a Dabbler?
Dabblers never really get anywhere! They just hold on, do a bit here and there and end up wondering why they are making no money. Usually disheartened, they give up and go away! Did you know that 97% of all people who try Internet marketing FAIL! That’s good news though, for the rest of the people that are prepared to do the hard yards. I used to be a dabbler!
But then I realized I had to get serious! How are you supposed to succeed when you don’t really know how?

Now I’m a very passionate person. I only do great things and I never quit! So, after my initial flutter with Internet Marketing, I realized that if I was going to succeed on the net, I really had to stop dabbling and get serious quickly. Otherwise I would risk becoming disheartened and completely annoyed with myself, which would only make success so much harder to achieve. This to me meant – time to get educated!
I spent a good deal of time and money, signing up to this Internet course and that Internet Business Training Program and in the end whittled them down to the best available programs on the net today. I am still a member of a few
(because they offer different and ever evolving attributes and information) and… I like to keep up with the times!
In summary, the answer to the question, Internet Business…Is it really that Easy? Is YES!
It is for anyone that wants to take the time and learn the business that is! My advice to you if you’re just starting out is to get yourself a good Internet Business Training Program. This is the only real way to succeed. Learn the lingo, the challenges and how to approach them, learn the common practices and industry standards – just learn as much as you can.
Remember, if you learn more, you earn more! To make it easy for you, I have researched and reviewed several Internet Business Training Programs on my Web Site. You can check out my reviews at www.WeMakeMoneyOnline.com. You will also find several related articles, topics and tools to read up on that will help you get your piece of the Internet Business Pie.
It’s your choice – tell me, are you a dabbler or on the road to a bounty of educated wealth?

Kym Robinson is the Webmaster of WeMakeMoneyOnline.com and writes articles on topics related to Home/Internet Business and Marketing. Get 6 FREE ebooks relating to Home Business and Internet Business Training Program‘s NOW!

Article Source: http://www.ArticleBiz.com

Hire PHP Programmer – Outsourcing is the key to success

August 11, 2008

The market trends are changing tremendously and so are organization policies to keep up the up coming trends. Many international organizations have realized that with increasing costs and competition outsourcing resources is the best way out. Organizations globally Hire PHP Programmer from professional Web Development Companies to get the job done at half of the cost.

Outsourcing is the most powerful business tool used by different organizations world over. Many companies from various industries are deploying this strategy to maintain a continuous growth and stability in this competitive market. Outsourcing helps in providing low-priced products and best customer services in the field of technology. Developing web applications can be quite an expensive task and companies with tight budget do not want to overspend on the same. Thus, many companies are looking for different alternatives to get quality work at a lower price.

The term Hire PHP Programmer is still not that common in the industry yet, but a trend is growing towards it. PHP being one of the most effective open source scripting language is getting its credit now and more and more companies have started using PHP for development of dynamic websites and customized web applications. With limited resources PHP Programmers have started charging a high price for their services which not many companies can bear. Thus, a lot of small, medium and large corporations have initiated to Hire PHP Programmers from low cost countries that provide similar services at an affordable cost.

Offshore It Staffing is a strategy where services are obtained from external suppliers overseas. In this set-up the core operations such as sales, management, client servicing etc are taken care by the internal departments of the company and the non-core operations such as technology, data services etc are handed over to the external company which is an expert in the targeted field. It gives the company cost, time and quality advantage. It brings down the overhead expenses and the company can spend time in growth section where their core competency lies.

Why India has become the most effective market for offshore IT staffing services?

Offshore IT Staffing has revolutionized the web world and companies in India has contributed a great deal towards it. Indian market at present is offering space, resources, manpower at rates which no other country can offer. In India the staffing companies enjoy low labor cost, dedicated man power and good infrastructure which is required for generating response for outsourcing. The recent market trends have placed India at a number one position for offshore outsourcing in the world.

How Hiring a PHP Developer will help your company? Now, the answer to this question is Outsourcing Benefits:
• Reduces the cost for the following: non-productive administrative costs, human resources related fees, government taxes, in-house training expenses, etc. Since, the outsourcing company appears as your organization employees, it will take care of all the liabilities for you.
• By outsourcing overseas, the organization is at an advantage as the value is less than par foreign currencies. Companies have to pay a fraction of cost as compared to local manpower resources in the local area.
• The company does away with all the budget allotment and traditional recruitment and staff maintenance issues. The company you are outsourcing will be handling all these duties for you.
• IT Offshore Staffing companies usually provide round the clock services and support to their partner clients

IT Chimes an Offshore IT staffing and an Outsourcing company in India specializes in providing quality, cost-effective and flexible services to clients looking to Hire PHP Programmer or a complete PHP team. IT Chimes has a portfolio of more than 100 clients who have used its dedicated developer services and have been successfully delivering projects on continuous basis.

For more information to http://www.itchimes.com/off-shore-it-staffing/hire-php-programmer.html“> Hire PHP Programmer visit IT Chimes or email info@itchimes.com

Article Source: http://www.ArticleBiz.com

What is Fantastico?

August 9, 2008

Fantastico is a program that comes with most hosting packages, integrated with the popular online control panel- Cpanel to offer web hosting useres the ability to install popular programs and scripts. The installation of these programs and scripts are significantly simplified, all with the ease of a click of a button. Web-hosting users are able to install multiple instances of popular open source programs for their web design needs. For users who intend to get their sites up and running in minimal time, Fantastico is the perfect solution.

Also referred to as Fantastico Deluxe, the popularity of this program seems to just keep on growing, and with good reasons. An interesting feature of Fantastico is that it is updated on a regular basis to ensure that users will always get the latest software patches and upgrades. Users will have that peace of mind of knowing that their scripts are kept up-to-date with security updates and functionality improvements.

It is important to note that Fantastico is available for Linux / PHP web hosting only. Having said that, this is not to be mistaken with its compatibility with the user’s operating system. Linux / PHP web hosting works perfectly fine for users using Windows as their operating system. In fact, most of the web hosting services on the web are running on Linux system.

Fantastico Deluxe also normally comes with Templates Express, which is a series of static templates for website building. This reduces the hassle of having to build websites from scratch, especially for beginners. Webmasters can expect to easily set up a fully functioning dynamic website and has many features such as polls, calendar, weblinks, message comments etc. Other features include multiple polls, templates, unlimited options, IP logging, IP locking, cookie support, comment feature, vote expire feature, random poll plus more. Fantastico includes easily over 40 scripts for you to choose from. For the more experienced users, you would notice that Fantastico is an amazing cPanel/PHP based Web application. It automatically installs preconfigured PHP/MySQL scripts and databases into a Cpanel-managed virtual host.

In short, Fantastico is ideal for any web designer or developer, ranging from someone with no knowledge of building websites to an expert web designer. It provides streamlined development and management process of your website, thus ensuring a hassle-free and a greatly reduce human error in web designing activities. The best part is that Fantastico would normally come as default and for free with every cPanel hosting plans and WHM Reseller accounts. So, needless to say that the next time you go on search for your web hosting solution, having Fantastico is a definite must.

Author : Mer Amer writes in http://www.hostrecommend.com on various articles related to web hosting. Visit http://www.hostrecommend.com for more resources on web hosting and list of highly recommended web hosting services.

The Earth Is Coming To An End – A Flash Animation

August 9, 2008

About “End of the World”

For as long as I can remember, I have had a craving for funny flash animation that was on the internet. That craving for funny animations led me to find my favorite flash animation of all time.

Use the next link if you haven’t had the pleasure of watching The End of the World animation. This is one of the web’s finest animations.

Many people are looking

It’s safe to say that I’m not the only one out there that has an interest in this funny flash animation that some call The End of the Earth animation. In fact there are many of you searching for information on where and how to download this unique flash animation.

Download the flash animation

For those of you who are looking for the link to download The End of the World flash animation, you’re in the right place. Continue reading as I briefly explain a couple of the many different ways one can view and download this animation that’s about a few possible end of the world scenarios.

Right-hand click on the following link and select “save link as” to download The End of the World swf. A download box will appear asking you where you want to save the file. Go ahead and save the file to your downloads folder, just remember that the file will be in .SWF format.

Viewing “The End of World” animation

Viewing of the animation can be accomplished many different ways. Once you have downloaded this flash download the easiest way to view the animation would be to right-hand click on the file and open it with either Internet Explorer or Mozilla firefox. Viewing the End of the World animation this way has it’s advantages. Since the file is actually on your hard drive now and not sitting in an online server, you don’t have to be online to view the file.

Adding the animation to your web site

Are you ready to add this creative animation to your site or your blog but just aren’t sure how to go about creating a page especially for The End of the World animation? If this is the case then the only thing I could suggest would be to navigate back over to The End of the World page using the link provided above and right-hand click anywhere on that page (except on the animation). Select “view source” to see the actual code which so you can get an idea of how to place your downloaded flash file within a web page.

Author : Austin Luna’s web site has a focus for finding unique desktop toys and flash animation while uncovering web sites that provide a high quality experience. If you’re looking for fun things to do while online like finding desktop toys or finding new and exciting interactive web sites then this is a great site.
http://www.acreativedesktop.com

Improve Your Visitors Experience – Add Scripts to Your Website

July 11, 2008

For new webmasters, adding third-party software and scripting to a website can be a really scary proposition. I remember when I put my first scripts on my own website. Even with my basic dos programming experience in high school, I was still intimidated by the whole process. I was so sure that I was going to screw something up.

The very first script I ever installed on my website was a Graphical Counter from BigNoseBird.com (www.bignosebird.com/carchive/counter.shtml). I ended up spending five days playing with the script to get it to display just the way I wanted it displayed.

The second script I ever installed was a Recommend This Page To A Friend script, also from BigNoseBird.com (www.bignosebird.com/carchive/birdcast.shtml).

How Scripts Differ From Ordinary HTML

Basic web building uses HTML. HTML is simply a markup language that helps you display text and images within a web page.

Most of us know the basics of how to build a webpage in HTML. Others use website design software that interprets the requests of the user to build a webpage in HTML.

In its most basic understanding, “scripting” is the process of programming webpages to perform certain calculations, which will affect how information is displayed on the webpage.

If you fill out a form on a website and hit send, chances are that you are engaging a script of some sort to interpret the information that you have sent to the website. If you return to a website and it knows your username and password, then a script has been involved in the process to make your return visit much simpler. If you see a list of the most recent posts on a website, then a script was used to make that information appear for your consumption.

Scripting is most often handled in Javascript, VBscript (Microsoft’s answer to Javascript), PHP or Perl. Each one is different in its structure and utilization.

Javascript can be added within the actual HTML of a webpage, and it will fire when the page is loaded or when a request is made. One way that I have recently seen Javascript used was for a page that was doing a countdown of how much time remains until their scheduled event. I have actually used Javascript to put news feeds across the top of my webpages. Some Javascript is usually placed in the page header, between the HEAD tags within the HTML. Other Javascript is placed in the HTML body where the Javascript activities are intended to appear.

VBscript works in the same manner as Javascript, but needs to reside on a Microsoft Windows server.

PHP and Perl are more appropriately designated as languages. Both are file types, and both allow you to design an entire website or parts of a website to perform specific actions or functions.

A function is defined as, “Functions (also known as subroutines and procedures) are chunks of code – parts of programs – which can be called from another part of the program. Generally, functions greatly enhance the space-efficiency and maintainability of computer programs.”

PHP and Perl Usage

Most servers have PHP and Perl functionality built into the web hosting accounts. However, not all web hosting companies are comfortable offering Perl (CGI-Bin) access to their users.

The reason why many web hosts shudder at the thought of making the Perl libraries available to their users is because Perl is a very powerful scripting language. In the hands of the wrong person(s), Perl access in a server can be used to bring great harm upon the server.

In order to operate Perl scripts, you must have the ability to change and set file permissions on any file that resides on your web hosting account. If you have just a basic Yahoo hosting account, you will not be able to use any Perl applications on your website. Some web hosts prohibit Perl usage at any level.

PHP is a new language that came about over the last few years. It has been designed to allow people who do not have Perl access to still have the ability to do scripting on their domain.

PHP generally does not require that you have access to file permissions. In Perl, executable files must carry permissions of 755. In PHP, most files will only be required to carry permissions of 644, which are the same permissions a standard webpage carries.

Fortunately for Perl programmers like me, PHP operates in many of the same manners that Perl programs operate. The learning curve from Perl to PHP is not very big at all.

Perl and PHP Bring With Them Powerful Libraries of Functions

What makes Perl and PHP as powerful as they are is the fact that both utilize functions very well. Basically, a function will carry out one specific task, and it will be able to be called from anywhere in your software.

Generally, one of the very first actions to be taken in a script is to INCLUDE all other files that are needed to operate the software. The additional files generally carry many of the functions that will be used in the software.

Then the software proceeds to carry out all of the necessary functions in order to build a webpage in a specific, pre-defined manner.

Programmers decide that there is a task that they perform often, and then they build it into a function. In time, the programmer will usually make his function available to the programming community. And eventually, if the function is exceptionally useful, then the function will be bundled in new releases of the basic Perl or PHP build. All of these additional functions are made available as the functions library.

How To Find Perl and PHP Scripts to Use On Your Website

There are actually many places you can go to find scripts to use for your websites. Some websites offer directories of free and paid scripts. Some websites will let you have their scripts if they can have your email address.

Additionally, there are literally thousands of websites and hundreds of books that will teach you how to write your own scripts in any of these languages.

When I am in the mood to improve my coding abilities, I like going to: http://www.planetsourcecode.com/ Planet Source Code offers full scripts and pieces of scripts, with feedback, that will teach me to be a better programmer.

My favorite place for locating scripts to download for free or to buy is: http://www.resourceindex.com/

The Resource Index has one part of their site dedicated to Perl scripts: http://cgi.resourceindex.com/

They also have one part of their site dedicated to PHP scripts: http://php.resourceindex.com/

Another decent site for locating scripts is at: http://www.hotscripts.com/

Many individual programmers also offer a lot of good software for purchase or for free. A few of the good ones will be:

http://www.scriptarchive.com/

http://www.bignosebird.com/

http://www.willmaster.com/

In Conclusion…

If you have ever told yourself, “it would be cool (or useful) if I could do this for my website’s visitors,” then you are in the market to learn how to use scripts on your website.

If you have imagined it, chances are someone has programmed it. If they have programmed it, then you will either be able to download it for free, or to buy it at a very reasonable cost.

Before you plunk down your money to buy a program or script, be sure that the programmer is willing to show you the script in action. If it doesn’t do what you want it to do, don’t buy it. If it does do what you want to do, then by all means, do consider purchasing the software for use on your own site.

When programmers offer their software for sale, their documentation is usually pretty good. They will tell you what steps you need to take to install it on your server, and they will tell you how to operate the software.

It is very realistic to believe that if you like what the software does, you can have it live and operational on your website in less than 30 minutes in most cases.

Good luck. I will be around later to see what cool stuff you have added to your website. ;-)

Author : Gavyn Stewart is a writer and programmer. When we needed software for our websites, we would always go on the hunt for software to buy. At the end of the day when we could not find pre-packaged software to do exactly what we wanted it to do, we built our own. Since most programmers are not business owners, how could they know what we really needed? We have started making some of our own software available for purchase at: http://www.StewartConsultants.com.

The Advantages of Using Dynamic Websites

July 11, 2008

Using static website could actually pose many problems to you. If you intend to show the contents of a datafeed file on your website, you have to create all webpages one by one. Then you will encounter another problem when it comes to update the datafeed with the latest products or change the general layout of the site. If you have any experience with those problems you may be agree that it is difficult to maintain a static website.

Some problems with datafeeds can actually be solved using special software. The software can help you create many webpages automatically depending on the contents of a datafeed file. Unfortunately you still have to upload all those webpages to your hosting server.

Dynamic websites can help you overcome those problems. Activities such as adding and updating data can be accomplished easily because all data is stored in a database (e.g. MySQL). That means when you want to update the contents of your website you only need to manipulate the data stored in the database. Adding or updating thousand webpages could be accomplished by exporting a datafeed file to your database.

As database is the place to store the elements to build your website, a server-side script written in PHP, ASP or PERL does the real works. It is the PHP, ASP or PERL code that fetchs the data directly from the database and show it on your webpages.

Now, how if you want to change the layout of your website like inserting adsense code on each webpage? Once again with dynamic website you can do it easily. You only need to deal with the templates for your site. One change you make could affect the layout of each and every webpage.

In order to use dynamic websites, you need to have at least:

1. A server-side script to build a dynamic website

You can buy the script, hire a programmer to create it or even build it yourself. Although learning to create a dynamic website is challenging but in the end you will be able to customize the website at your own direction. For instance you will be able to fetch any data stored in a database that contains specific keywords. Many scripts are also freely available online. Some hosting companies have even already provided a feature to build dynamic websites in just some clicks. It could be very useful especially if you don’t want to put your efforts in programming.

2. A website hosting that supports the script

Make sure the hosting service meets the requirements of your script. What kind of internet programming language and database it supports? How about the versions? Don’t forget to notice other requirements such as whether the provider lets you access the .htaccess file or install additional modules.

As you can see, dynamic websites could save your invaluable time and effort in building and maintaining your websites. You can change your design and content easily anytime you wish. Dynamic website with dynamic content seems like the future of the Internet.

Author : Heris Yunora is the owner of http://www.unlimitedhostingplan.com, a website that provides the comparation between two popular unlimited web hosting providers.


Follow

Get every new post delivered to your Inbox.