php-use the header() function-php

An HTTP (HyperText Transfer Protocol) header is used to send information back and forth between the server and the client (the Web browser). Normally this information is in the form of HTML, which is why the address for Web pages begins with http://.

But HTTP headers are a complicated enough subject to warrant a little more attention. There are actually dozens upon dozens of uses for HTTP headers, all of which you can take advantage of using PHP's header() function.. Here I'll demonstrate the most frequently used purpose—redirecting the user from one page to another—although the World Wide Web consortium's specifications on the subject are vast (Php header).

To redirect the user's browser with PHP, you would code:

header("Location: page.php");

You can also use the header function to send cookies, which is a good backup to the setcookie() function which sometimes has inconsistent results from one browser to the next.

header ("Set-cookie: name=value;
  expires=expiration");

The most important thing to understand about using header() is that it must be called before anything else is sent to the Web browser, just as you have to be careful when using the setcookie() function.

To demonstrate redirection, let's create a simple login script that sends a user to one page if they use the correct username and password or to another if they don't.

<?php

header ("Location: index.php");

exit;

?>

Maximum Performance from MySQL

Optimization is a complicated task because it ultimately requires understanding of the whole
system. While it may be possible to do some local optimizations with small knowledge of
your system/application, the more optimal you want your system to become the more you
will have to know about it.
So this chapter will try to explain and give some examples of di erent ways to optimize
MySQL. But remember that there are always some (increasingly harder) additional ways
to make the system even faster.
 Optimization Overview
The most important part for getting a system fast is of course the basic design. You also
need to know what kinds of things your system will be doing, and what your bottlenecks
are.
The most common bottlenecks are:
Disk seeks. It takes time for the disk to nd a piece of data. With modern disks in
1999, the mean time for this is usually lower than 10ms, so we can in theory do about
1000 seeks a second. This time improves slowly with new disks and is very hard to
optimize for a single table. The way to optimize this is to spread the data on more
than one disk.
Disk reading/writing. When the disk is at the correct position we need to read the
data. With modern disks in 1999, one disk delivers something like 10-20Mb/s. This is
easier to optimize than seeks because you can read in parallel from multiple disks.
CPU cycles. When we have the data in main memory (or if it already were there) we
need to process it to get to our result. Having small tables compared to the memory
is the most common limiting factor. But then, with small tables speed is usually not
the problem.
Memory bandwidth. When the CPU needs more data than can t in the CPU cache
the main memory bandwidth becomes a bottleneck. This is an uncommon bottleneck
for most systems, but one should be aware of it.

20 best websites to create free blogs

20 best websites to create free blogs

Blog is one of the most popular  platforms for Make Money.
that allows users to create free blog with very useful info,news,knowledge
of many things.You can post all kinds of info,articles,Link,data
popular topics for free. blogging is easily make interface to
Connect People.

http://www.livejournal.com/
http://blogetery.com/
http://www.blogsome.com/
http://edublogs.org/
http://wordpress.com/
http://opendiary.com
http://blog.com/
http://www.blogger.com
http://www.tumblr.com/
https://posterous.com
http://www.weebly.com/
http://www.typepad.com/
http://hubpages.com/
https://www.yola.com/
http://www.webs.com/
http://www.webstarts.com/
http://www.webnode.com/
https://www.zoho.com/sites/
http://www.jimdo.com/
http://www.webgarden.com/

PHP-Renaming Files and Directories


Renaming  Files and Directories

There are a few useful file and directory functions built-in to PHP which I'll cover in brief here. They include renaming and deleting files as well as listing files located in a directory. I'll review the syntax for some of them first and then demonstrate how they function within the context of a very useful PHP script.
First, there is the rename() function, which works as you would expect it to:
 
rename ("filenameold", "filnamenew");
 
It can be used on either files or directories.

Renames a file from the old filename to the new filename. The user that PHP runs as must have sufficient permissions to rename the file.


Returns TRUE on success; 
FALSE on failure

<?php

$fileold = "oldfile"; 
$filenew = "newfile"; 

if(!rename($fileold, $filenew)) 
{
    echo ("Rename process failed"); 
} 
 ?>

php-best top 20 Open Source Content Management Systems

best top 20 php Open Source Content Management Systems


php-best top 20 Open Source Content Management Systems

All this open source content management system written in PHP/mySQL and well configured themes and modules for rich web sites. this help building your site high structured web application project. Every cms system are used to organize content management,info,blogging.

Open source content management system - download free web design templates the open group works towards enabling access to integrated information within and between enterprises, based on open standards and global interoperability it is a. Dev shed forums - open source web development wordpress started in 2003 with a single bit of code to enhance the typography of everyday writing and with fewer users than you can count on your fingers and toes.

Php interview questions with answers





Drupal          http://www.drupal.org/
 Mambo                http://www.mamboserver.com/
 MODX                http://modx.com/
 WordPress           http://www.wordpress.org/
 ProcessWire         http://processwire.com/
 Xaraya                 http://uaweb.arizona.edu/xaraya_typo3
 Joomla                  http://www.joomla.org/
 Media Wiki           http://www.mediawiki.org/
 Symfony               http://symfony-cms.com/
 Pimcore                http://www.pimcore.org/
 eZ Publish             http://ez.no/
 Cotonti                 http://www.cotonti.com/
 Exponent CMS     http://www.exponentcms.org/
 Liferay                  http://www.liferay.com/
 TYPO3                http://www.typo3.com/
 Moodle                http://www.moodle.org/
 Dolphin                http://www.boonex.com/products/dolphin/
 XOOPS              http://www.xoops.org/
 Pligg                    http://www.pligg.com/
 Movable Type     http://movabletype.org

php urlencode - Make a strong GET Query String

 php urlencode

URL-encodes a string, converting spaces into plus (+ ) signs.

urlencode() makes a string safe to use as part of a URL. It does this by encoding every character within the string that may be misinterpreted by a transport agent (such as an email server) or interpreted as a URI delimiter—for example, the at sign (@), hash (#), and question mark (?) symbols.  


urlencode() encodes characters

<?php
$hass_url = urlencode ($acc_url);
?>

This conversion is done so that the encoded string will be compliant with legacy applications.

Make a GET Query String

urlencode( ) prevents any special characters in the variable names or values from disrupting the constructed URL, you may have problems if your variable names begin with the names of HTML entities.

php implode array elements

php implode array elements


Join array elements with a string string.
implode(string, arraypieces)
Returns a string containing a string representation of all the array elements in the same order,
 string between each element.
 Example 1. Implode() example
$dash = implode ("-", $array);
  join(), andsplit().

 join(string, arraypieces)

The implode() function inserts a comma after every array element and returns a string with the inserted commas. We eliminate the last two characters of the string by using the substr() function because we do not need to print the trailing ', '. This is a very useful function for printing out entire arrays. In PHP, when you print $list; where $list is an array, PHP prints "array" instead of the elements of an array.

The array_unique() function will, given an array, strip the array of all its duplicate items and return a new array. The array_unique() function works on both associative and numerically indexed arrays.

16 High Rank Finance Websites-Stock Market,Business News

16 High Rank Finance Websites-Stock Market,Business News

finance,MarketWatch - Stock Market Quotes, Business News, Financial News,Business News, Stock Market & Financial Advice.
The latest breaking financial news ,economy, personal finance, money markets,real estate
all are need to know now a days.Their friendly  way could have easily
 clarity of purpose and deep-down desire to help businesses do more to be found in this
site.


http://finance.yahoo.com/
http://www.bloomberg.com/
http://www.marketwatch.com/
http://www.cnbc.com/
http://www.businessweek.com/
http://www.forbes.com/
http://finance.google.com/
http://www.reuters.com/
http://money.cnn.com/
http://thestreet.com/
http://www.credit.com
http://www.getrichslowly.org
http://www.smartmoney.com
http://www.fool.com
http://www.bankrate.com
http://www.minyanville.com

top 50 most popular best sites for directory list free

top 50 most popular best sites for directory list free

Make Your Own Website Search Engine Placement by Submitting it in Top Ranking Directories.
Authoritative Inbound LinksSome links have more power than others, so links from the BBC or major web directories such as dmoz.org or .edu domains have greater authority and hence more weight.
Internal Website Links It is optimal to cross-link the pages on your website and to link to relevant content deep within the website. Providing multiple paths into your site improves opportunities for spiders to crawl your website and index all the content because most search spiders will go only three levels deep into a website.

 Craigslist Directory
 Poor Directory
 UPS Directory
 Bing Directory
 Interesting DIR
Aquarius DIR
 Facebook List
 Ebay DIR
 BestBuy DIR
 Target Directory
 Family Directory
 A Funny DIR
 Backpage DIR
 Dmegs
 norlinks Directory
 SoMuch Directory

SEO Free Link Directory
 Free Backlinks Directory
 Add Free Link Directory Auto Accept
 Lemon Directory
 Backpage DIR
 Submit URL Directory
 SEO OP DIR
 Domain name SEO
 Craiglist DIR
 Search Domain DIR
 Mediafire Direct Link
 Directory Analytic
 Linkedin Directory
 Eco Dir
 Advanced SEO Directory
 A People Directory
 Best Directory 4 you
 Add Good Sites
 One Sublime Directory
 Alive Directory
 a3place Directory
 ACE Directory
 Active Directory
 Abstract Directory
 A Web List
 Be Directory
 ADbrite Directory
 Hot Directory
 Add Directory
 Beeg Directory
 Clicksor Directory
 Hulu Directory
 Sublime Directory
 Ask Directory
The Open Directory Project (ODP), http://dmoz.org, is the most important taxonomic directory on the Web. Formally hosted and administered by the Netscape division of AOL, the ODP is run along the lines of an open source project.

The ODP is run and maintained by a vast army of volunteer editors. These editors follow internal checks and balances to keep the integrity of the directory. See http://dmoz.org/guidelines/ for more information about the ODP review process and guidelines for site inclusion.
You, too, can become an ODP editor in an area of your interest and expertise. See http://dmoz.org/help/become.html for more information about becoming an ODP editor. This is a partially facetious suggestion, but one of the most effective ways to use SEO to promote your sites is to follow the patterns and practices of the ODP to get your sites included. You'll find an FAQ about how to add your site at http://www.dmoz.org/add.html (this FAQ is also available via a link from the ODP home page).
The ODP taxonomy (categorization system) and the sites included in the categories are freely available as data for use by anyone who wants to run their own search engine as long as the terms of the ODP's free-use license is complied with.

The Yahoo! Directory, a somewhat lesser known part of Yahoo!, works in pretty much the same way as the ODP, except that it is privately maintained Sites added to the Yahoo! Directory tend to end up in the Yahoo! index, as well as other important search indices, often with high ranking in response to searches related to the Yahoo! Directory category for the site.

To suggest your site for inclusion in the Yahoo! Directory, open the Yahoo! Directory's home page, http://dir.yahoo.com/.
You can also find the Yahoo Directory by opening the main Yahoo! home page, selecting Directory as your search category, and searching for a term. The search results you will be presented with are from the Yahoo! Directory (not the Yahoo! Web index), and the display will show where in the taxonomy you are, so you can browse through related categories.