candle clairol essence herbal

just another regularban.info web blog

MEMBERS:

Using Functions

Functions are used to perform a well defined task that is normally repeated at various places within a web site, web application, or other software application. The function sometimes needs certain information before performing its task, and sometimes returns a value to the calling page or program.

An example of how to use a simple function in PHP:

 function showMessage() {

echo "{$_SESSION["message"]}"; }

The above example shows a very simple function that displays the contents of a session variable called 'message'. The idea being that while a user is using a web site, etc, various messages are generated and stored in the 'message' session variable. Whenever the showMessage function is called, the contents of the session variable are displayed. So, for example, when the user logs on, you could display a message saying that they have done so. Likewise, when they log off, a different message could be displayed.

Calling a function

To call the showMessage function, you would just need to include the line:

showMessage()

in the web page (wrapped in php tags to distinguish it from normall HTML).

Passing values to a function

Often, a function requires one or more input values in order to perform its task. For example, take the following example that takes two numbers as input, and adds them together. The result is then returned to the calling web page or program.

function addNumbers($number1,$number2) {

$answer = $number1 + $number2;

return $answer; }

In the calling program we would have something similar to the following:

$number1 = "5";
$number2 = "6";
$sumOfNumbers = addNumbers($number1,$number2);
echo "$sumOfNumbers";

Obviously, in a real program you would not have the numbers hardcoded like this, but they would be obtained from user input or by some other means. Notice also that although the name of the returned variable is $answer, the calling program makes no reference to that. We could, if we wanted to, change the calling program to:

$answer = addNumbers($number1,$number2);
echo "$answer";

which might make things slightly easier to understand.

About the Author: John Dixon is a web developer working for My Health Questions Matter, a company that helps users of the health service to ask the right questions when discussing their medical condition with health professionals. John is also interested in computer history, and maintains http://www.computernostalgia.net, a site dedicated to the history of the computer. John also provides web development services to large and small clients via his own company John Dixon Technology Limited.

 


Benefits of Outsourcing Web Development Services to India

Today more and more number of IT companies is outsourcing their web development services to developing countries like India. There are plenty of good quality outsourcing web development companies located in India and provide a ready resource of quality talent.

So why outsource?

There are many reasons why many a web development company in India has received lucrative outsourced projects from abroad. Most IT companies find that they incur greater cost savings by leveraging services from a web development company India. In addition to that most of the Indian software engineers possess a high quality of education and even language does not pose a problem as with other countries such as China etc.

Much more than cost savings!

There are several benefits an IT company can obtain by outsourcing its web development services to India. While earlier the main focus used to be on cost savings, today the reason India is a preferred outsourcing destination is because of the high caliber of talent here. The Indian standard of education is very high and hence the quality of engineering talent is also high.

Realization of ROI

By leveraging dedicated website development services in India, many foreign companies are finding tremendous benefits, not to mention an almost immediate realization of ROI. With dedicated timelines and strict adherence to project schedules product launches are made on time, with the result that the IT company can now begin to realize ROI that much faster.

Flexible engagement model

In addition many web site development company India are following a stringent and highly process oriented engagement model. That means that irrespective of whether the IT Company is a start up or a full fledged organization, the relative go to market timelines will be eventually accelerated.

Non-core issues handled

Apart from this several outsourcing web development companies also seek to undertake infrastructure issues. For example a regular ODC modeled company that also incubates the client's development facility will most often take care of tertiary issues like HR, legal aspects as well as recruitment functions. That also means that the IT company can now focus on only its core competencies as most tertiary aspects are handled by the outsourcing company in India!

Domain expertise

Many companies located in India specialize in dedicated niches of various industry verticals. That means that no matter what your niche is or what category your product belongs to, India can deliver high quality web development services. The engineers here possess a high quality of domain and technical expertise. India is preferred for outsourcing projects not just for cost savings but also for the quality of services offered.

For high quality, innovative and cost effective dedicated PHP, ASP and ASP.net developers for your web development solutions, visit some of the renowned web development Companies in India: Tisindia.com and India-designers.net.

For SEO of your site visit: Seo.india-designers.net.

 


301 Redirects - When and How to Use Them

Just what is a 301 Redirect?

There seems to be a lot of confusion as to what to do when you move, delete, or want to redirect incoming web traffic from an 'old' web page to a 'new' web page. A 301 redirect is the most efficient method for web page redirection from an old web page to a new web page location. There is also some confusion as to how to handle the complete move or redirection from one web domain to another web domain. According to Google, "If you need to change the URL of a page as it is shown in search engine results, we recommended that you use a server-side 301 redirect instead."

How to Set Up a 301 Redirect

Depending on your web environment, there are several methods to set up a 301 redirect. A 301 redirect is not that hard to implement and it should preserve your search engine rankings for that particular page or web domain.

.htaccess 301 Redirection

The .htaccess file needs to be placed in the root directory of your old website. In this example, we are redirecting incoming web traffic from an old domain to a new domain.

Options +FollowSymLinks

RewriteEngine on

RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

The .htaccess file is the most common method used for 301 web site redirection.

PHP 301 Redirection

You would place this code in a file at the old location.

Header( "HTTP/1.1 301 Moved Permanently" );

Header( "Location: http://www.new_location.com" );?>

Of course with any code, you will want to test this.

IIS 301 Redirection

  • In Internet Services Manager, you need to right click on the file or folder you wish to redirect
  • Select the radio button titled "a redirection to a URL".
  • Enter the redirection web page
  • Check "The exact URL entered above" and the "A permanent redirection for this resource"
  • Click on 'Apply'

That is all there is to it.

There are other methods in addition to set up a 301 redirection which include coding for ASP, ASP.NET, Java, CGI, Cold Fusion and Ruby on Rails. The above are the most common that I've encountered. When set up correctly, a 301 redirect will preserve your search engine rankings when it is necessary to move files around or switch, or consolidate, domain names.

Jason Perry

Two great SEO tools which can help track the success of your web site are Web Position Gold 4 and Hits Link. Both which you can try for free.

 


Pages 
* About

Archives
    * February 2008
    * January 2008

Categories:
* Uncategorized

Last Updated:

regularban.info is proudly powered by WordPress MU running on  regularban.info.
Create a new blog and join in the fun!
Entries (RSS) and Comments (RSS).