Tuesday, October 20, 2009

How to recover windows password windows xp/vista/7/98/2000/me/2003

Download active password changer and use your usb flash to creat a start up disk then boot your system form flash and follow the instruction
Simple your windows is back
thanks
seuntech

How to add ringtone to iphone

1. Ruduce the length of the sound to maximum of 25 seconds
2. Convert the song to AAC using itunes, right on it form iTunes liabry and chose create AAC version
3. Locate the sound and rename it to .m4r then double click on it to add to iTunes and that’s all a s easy as ABC

iphone custom carrier bundle/logo

If you are on an Apple supported carrier
Navigate to this folder
/Systems/Library/Carrier Bundles/
Then locate your carries name and copy it to your system
You will need to locate the symlink for your carrier (usally a folder name with numbers in the same directory)
Look the link below for your carrier code
http://en.wikipedia.org/wiki/Mobile_Network_Code

If you are using an unsupported carrier
Visite this site first http://en.wikipedia.org/wiki/Mobile_Network_Code
For your carrier code
Then viste this site below and follow the instructions
http://www.volkspost.info/carrierbundle_pwn2/

@@ after you have gotten your carrier bundle edit the image to what ever you like retaining the size then upload everything back to the carrier bundle directory. The folder permission should be 777

Thanks
seuntech

SSH your iphone via USB cable

Down load putty or winsshd
And login with the information below
Login - enter 127.0.0.1 Username is root The password is alpine
( with Iphone tunnel suite you don’t need to put all this information it does it for you but it is not free)
Note you must install openssh first, the easiest method is with cydia
thanks
seuntech

HOW to change computer name

you can go into the registry and change the owner name.

Go to Start/Run and type in "regedit" without the quotes (Win 2000 type "regedt32")

navigate to:

HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion

Click the "CurrentVersion" folder and look for the "RegisteredOwner" key. Double click and change the value to your name. You can also change the "RegisteredOrganization" if you want to.
When finished go to File/Exit.

With Windows 98 (not sure about ME but you can try this path) find your way to:

HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/System/CurrentControlSet/Control

Click the "CurrentUser" key and change it to your name.

When finished go to File/Exit.

To verify your changes, right click My Computer and choose "Properties". Under "Registered to" it should show the new name and organization.

Now the computer is really yours!

View wireless network / wiffi password using WirelessKeyView

WirelessKeyView recovers all wireless network security keys/passwords (WEP/WPA) stored in your computer by the 'Wireless Zero Configuration' service of Windows XP and by the 'WLAN AutoConfig' service of Windows Vista. It allows you to easily save all keys to text/html/xml file, or copy a single key to the clipboard.

FLASH NOKIA PHONE WITH USB CABLE

Taken from my blog http://harry-christian.blogspot.com
This perfectly worked on my N73 and N70

Credits :

1. me.dhillon helper member of dotsis(dot)com
2. dotsis(dot)com forum
3. blue-nokia(dot)com


Disclaimer :

1. This article is for education purpose only.
2. I don't being held responsible to anything can cause damage to your mobile phone. Try it on your own risk.
3. What you have done here can void your Nokia warranty.
If you okay with that disclaimer above let continue. This article well tested on XP SP2 and my Nokia N73.


Q & A :

Q : Why upgrade to the latest firmware needed ?
A : Because the latest firmware can solve a lot of bugs such as slow messaging, slow opening gallery, RAM issue, etc

Q : I have Nokia phone that still in warranty why must i follow your tutorial while i can upgrade in Nokia Center ?
A : You're right. You don't need this one. Please go to Nokia Center to upgrade your firmware free of charge.

Q : Why offline ? You can use online update with Nokia Software Updater (NSU).
A : Thats because i have a bad internet connection.
If download offline firmware from rapidshare failed i just re-download again and again,
BUT if download online update through NSU failed then your phone DEAD.

Q : I have N70 or N73 or another N-series. I want to upgrade to Music Edition or Internet Edition with the latest firmware. Is that possible ?
A : Yes. This is what i have done. Just follow this article.

Q : I pay a visit to blue-nokia(dot)com and my phone is not listed. Do i need to upgrade ?
A : You're using old-fashion mobile phone (no offence lol). Then you can read the rest of this article but you won't need upgrade your phone.

Q : If flashing failed and my phone dead what should i do ?
A : Then you should read more careful my article. No i'm kidding, no worry about that.
You can flashing dead phone too.


Tools and Requirment :

NIGERIAN PROVERBS

CATEGORIES INCLUDED
• COMMON SENSE
• HARD WORK
• NOT GIVING UP
• COOPERATION
• PATIENCE
• KINDNESS
• HONESTY
• THOUGHTFULNESS
• GENEROSITY/SHARING
• HUMILITY
• GREED
• GOOD BEHAVIOR
• CONSEQUENCES
• PEACE
• WISDOM AND AGE
• COURAGE
• FAMILY
• FRIENDS
• SURVIVAL
• PATRIOTISM
• MISCELLANEOUS
COMMON-SENSE
1. A man who is trampled to death by an elephant is a man who is blind and deaf.
2. A hunter who has only one arrow does not shoot with careless aim.
3. A mouse that removes the palm-nut that turns out to be the bait of a trap, would already have known that the palm-nut does not ripen on the ground.
4. When a palm-branch reaches its height, it gives way for a fresh one to grow.
5. A bottle of oil warmed over the fire has no means of producing oil by itself.
6. One cannot go back to the farmer from whom one borrowed seed-yams to plant to say that the beetles have eaten up the seed-yams.
7. If one were to remove every smoking wood from a fire and condemn it as bad, one would be killing the fire itself.
8. It is wisdom to prevent someone from whom one cannot accept repayment to have access to one's valuable possessions.
9. It is the brutally outspoken man that earns enmity.
10. The elephant and the tiger do not go hunting on the same pasture.
11. A farmer does not boast that he has had a good harvest until his stock of yams lasts till the following harvest season.
12. He who pursues an innocent chicken always stumbles.
13. The fish that can see that its water is getting shallower, cannot be stranded.
14. Without knowing a way thoroughly at day time, never attempt to pass it at night.
15. It is only the tortoise that moves and carries its shell about, which it calls its house.
16. It is not enough to run, one must arrive and know when one has arrived.
17. It is a lazy man who says "it is only because I have no time that my farm is overgrown with weeds".
18. A man who lives on the bank of a river does not use spittle to wash his hands.
19. We do not use our bare feet to search for hidden thorns which we have seen in day time.
20. The gods only hear one wish at a time, and nothing more.
21. When will the goat be strong enough to kill a leopard.
22. Every river knows where its water would not be soaked up into the earth, and that is where it flows past.


HARD WORK
1. A farmer does not conclude by the mere look of it that a corn is unripe; he tears it open for examination.
2. It is little by little that a bird builds its nest.
3. To do one's duty is to eat the prized fruit of honor.
4. A farmer who would not work inside the rain and would not work under the sun, would have nothing to harvest at the end of the farming year.
5. The heap of yams you will reap depends upon the number of mounds you have plowed.
6. It is the work of one's hands that decides what one eats for dinner - for some it is pounded yam, for others it is pounded plantain or nothing.
7. An ant-hill that is destined to become a giant ant-hill will definitely become one, no matter how many times it is destroyed by elephants.
8. He who is afraid of doing too much always does too little.
9. Sleep and indolence are not cousins of a good harvest.
10. Success is 10% ability, and 90% sweat.
11. We live by hope, but a reed never becomes an Iroko tree by dreaming.
12. Sinews and big muscles do not make a farmer.
13. When a dying man cries, it is not because of where he is going which he knows nothing about, but because of what he wishes he would have done in the world he is leaving behind.
NOT GIVING UP
1. One must row in whichever boat one finds one's self.
2. When a person regrets endlessly, he gets to pay more for what he regrets.
3. It is little by little that a bird builds its nest.
4. It is not only the fox, even the snail arrives at its destination.
5. However long the moon disappears, someday it must shine again.
6. It is the same moon that wanes today that will be the full moon tomorrow.
7. It is only the toad that gets up from its knees and falls back again on its knees.
8. The spider that knows what it will gain sits waiting patiently in its web. The praying mantis is never tired waiting all day.
9. One does not become a master diviner in a day. A forest is not made in a season. The swoop of an eagle has seen many seasons and floods...
10. Who says the oasis in the desert is happy because of its hidden spring of water?
11. The cricket is never blinded by the sand of its burrowing.
12. An oil lamp feels proud to give light even though it wears itself away.
13. A bird does not change its feathers because the weather is bad.

COOPERATION
Common proverbs of cooperation are:
1. A herbalist that refuses to ask laymen what leaves he looks for in the bush, must have difficulties getting what he wants.
2. It is a pot of water that is already half full that the world would like to help in filling to the brim.
3. If a drum is not made, it is the fault of the master; but if the drum is made and is not beaten, then that is the fault of the boys.
4. When an elephant falls, meat is sure to be surplus for those who follow the hunter.
5. One finger cannot remove lice from the head.
6. When the teeth fall off, the nose is sure to collapse.
7. A man can not sit down alone to plan for prosperity.
8. A man who lives alone is either always overworked, or always overfed.
9. A single tree can not make a forest.
10. A single man can not build a house.
11. If a child shoots and arrow that reaches the top of a tall palm tree, then it must be that an elderly person carved the arrow for him.
12. A man who walks alone carries a load of palm-fronds.
13. When the right hand washes the left hand and the left hand washes the right hand, both hands become clean.
14. A housewife who complains that there is not enough foodstuff in the market should remember that if her husband adds to what is already available, there would be more for everyone.
15. It is by the strength of their number that the ants in the field are able to carry their prey to the nest.
16. Two footsteps do not make a path.
17. Two raindrops do not make a pool.


PATIENCE
1. A speedy wrestling and a bad fall go hand in hand.
2. Patient people are patient to gain longevity.
3. However long the moon disappears, someday it must shine again.
4. It is little by little that a bird builds its nest.
5. The thirsty fig sits waiting patiently, waiting for the arrival of the rains.
6. One does not become a master diviner in a day. A forest is not made in a season. The swoop of an eagle has seen many seasons and floods...
7. It is not only the hare, the tortoise arrives also at the destination.


KINDNESS
1. Without knowing a person we must not hate him.
2. He who digs a pit for others must invariably fall into it.
3. Those who derive fun watching lunatics, out to have one as a child or relation to know the pains of it.
4. A person on whose head lice are being removed, must be grateful.
5. By being grateful, a man makes himself deserving of yet another kindness.
6. When the laborer is praised, his cutlass begins to cut more keenly.
7. If men were now to turn their hostility towards the cat, it would not be long before the domestic cat becomes a wild animal.
8. If the owner of a calabash calls it a worthless calabash, others will join him to use it to pack rubbish.
9. Criticism is easy but it does not create.
10. If one imitates the upright, one becomes upright; if one imitates the crooked, one becomes crooked.
11. When a sickle is drawn, it in turn draws the tree to which it is hooked.
12. If a person who curses another is not better than the person he curses, a request is never made of him to rescind the curse.


HONESTY
1. Money does not announce how it is earned but whereas properly earned money appreciates, improperly earned money depreciates.
2. The bottom of wealth is sometimes a dirty thing to behold.
3. Rather than tell a lie to help a friend, it is better to assist him in paying the fine for his offense.


THOUGHTFULNESS
1. A fowl does not forget where it lays it eggs.
2. The habit of thinking is the habit of gaining strength.
3. It is one word of advice that one needs to give to a wise man, and that word keeps multiplying in his mind.
4. Does a man not know when he has pepper in his eyes? If we forget yesterday, how shall we remember tomorrow.
5. Thoughts and dreams are the foundation of our being.
6. We are what our thinking makes us.


GENEROSITY/SHARING
1. It is an unthinking man who achieves prosperity, and then finds with time, that his body can no longer pass through the door.
2. When an only kolanut is presented with love, it carries with it more value than might otherwise be associated with a whole pod of several kolanuts.
3. The man who remembers others, remembers also his creator.
4. The bird that remembers its flockmates, never missed the way.
5. When a dying man cries, it is not because of where he is going which he knows nothing about, but because of what he wishes he would have done in the world he is leaving behind.
6. The head could not have got to where it is now if it did not give.


HUMILITY
1. A performing masquerade who tries too hard to outclass his colleagues may expose his anus.
2. It is from a small seed that the giant Iroko tree has its beginning.
3. A family name is not cooked and eaten, one's life is the thing.
4. A good name is better than gold.
5. He who is courteous is not a fool.
6. The fowl perspires, but the feathers do not allow us to see the perspiration.


GREED
1. Those who are carrying elephants home on their heads, need not use their toes to dig up crickets on the way.
2. One can only try to get what one can from the head of an elephant, no one ever carries it home.
3. The alcohol that is insufficient for a whole town ought not to intoxicate one man.
4. The leech that does not let go even when it is filled, dies on the dry land.
5. A bag that says it will not take more, and a traditional doctor who says he would not leave anything behind are both sure to suffer.


GOOD BEHAVIOR
1. If a man is not clean and smooth, there is nothing he can really do about pride.
2. Even an old woman may run when a goat carries her snuff-box.
3. A man who is advised and he takes it, is still a man who acts from his own free will.
4. When a ripe fruit sees an honest man, it drops.
5. It is one person in a street that kills a dog and the street is named a street of dog killers.
6. When a fowl gets to a new town, it stands on one leg until it knows that it is a town where people stand on their two legs.
7. When a face is sullen it remains there to be seen on its owner.
8. When a woman cannot have good palm-nuts to give her rich oil, she still has to maintain decency in order to remain one of those that sell good quality oil.
9. A man who has one finger pointing at another has three pointing towards himself.
10. A man who eases himself in public, gives cause to others to despise him.
11. The man who is honored, has first honored himself.
12. Greatness and beauty do not belong to the gods alone.
13. Anyone who urinates in a stream should be warned because any of his relatives may drink from the water.
14. A person who does not bathe, must know it of himself that he is dirty.
15. Antagonism is not good for fowls, and it is not good for goats; worse still, it is not good for human beings.
16. Our examples are like seeds on a windy day, they spread far and wide.
17. A clay pot of water is never hot-tempered.
18. A person who picks something and decides to make it his own, ought to think how he would feel if he was the person who lost the property he picked.
19. He who is called a man must behave like a man.
20. If one would not eat pounded yam for its own sake, one can still eat it for the sake of the soup that goes with it.
21. One must have to wait till the evening of one's life time to know what gratitude to pay to one's guardian spirit.


CONSEQUENCES
1. A man who is advised and he takes it, is still a man who acts from his own free will.
2. If hunger forces a farmer in a particular year to eat both his yam tubers and the seed-yams, the succeeding years would still be worse because he would have no yams to eat and none to plant.
3. Sometimes the rain might force a man more than once to seek shelter under the same tree.
4. When the roots of a tree begin to decay, it spreads death to the branches.
5. It is the fear of what tomorrow may bring that makes the tortoise to carry his house along with him wherever he goes.
6. He who digs a pit for others must invariably fall into it.


PEACE
1. Let's fight, let's fight, no one knows whom fighting would favor.
2. Two men quarreling do not share the same seat on a canoe.
3. To have no enemies is equivalent to wealth.
4. If the owner of two adjacent farms cannot be friends, then they must wait till their next reincarnation to be able to make friends.
5. Whoever says "let's fight" does not know who will be victorious.
6. When a man finds that he was wrong to have refused to eat, he should leave his anger and play a harp to call for harmony.
7. Without retaliation evils would one day become extinct from the world.
8. A spacious ground is the right place to demonstrate one's skill in wrestling.


WISDOM AND AGE
1. An old banana leaf was once young and green.
2. Old age does not come in just one day.
3. When a dying man cries, it is not because of where he is going which he knows nothing about, but because of what he wishes he would have done in the world he is leaving behind.


COURAGE
1. He who does not look ahead always remains behind.
2. Courage is the father of success.
3. Charms do not perform miracles on the shelf; they perform for those who are brave.


FAMILY
1. A family name is not cooked and eaten, one's life is the thing.
2. A person who has children does not die.
3. We can not choose who our relatives should be, even though we may come to like some better than others.
4. A woman who is not successful in her own marriage has no advice to give to her younger generations.
5. When a man loses his prestige, he does not regain it by going to where he is not known.
6. A good name is better than gold.
7. A man that begets a barren cannot have a grand child.
8. A piece of iron can only become what the blacksmith says it should become.
9. A child who fears beating, would never admit that he played with a missing knife.
10. A child's face is his mirror.
11. It is the habit that a child forms at home, that follows them to their marriage.
12. It is an irresponsible adult that creates enmity because of a disagreement that arises between two children.
13. A child is what you put into him.
14. "Flog my erring child" comes from the lips, "don't hurt him/her" comes from the bottom of the heart.
15. Talks that are considered to be important must be made to drag on for so long as to make even the deaf begin to hear it.
16. Criticism is easy but it does not create.
17. Love is better than a whip.
18. A child who has no mother will not have scars to show on his back.
19. Even as the archer loves the arrow that flies, so too he loves the bow that remains constant in his hands.
20. When a dying man cries, it is not because of where he is going which he knows nothing about, but because of what he wishes he would have done in the world he is leaving behind.


FRIENDS
1. To eat from the same pot with another man, is to take an oath of perpetual friendship with him.
2. If one imitates the upright, one becomes upright; if one imitates the crooked, one becomes crooked.
3. Rather than tell a lie to help a friend, it is better to assist him in paying the fine for his offense.


SURVIVAL
1. It is the toothless animal that arrives first at the base of the fruit tree, to eat his fill before others arrive.
2. A child does not die because the mother's breasts are dry.
3. If the load is too heavy for someone to carry, one would be better off to give the load to the ground to carry.
4. The tree that cannot shed its old leaves in the dry season, cannot survive the period of drought.


PATRIOTISM
1. When one is taking a chicken from its roost, the hen is bound to attack with at least its claws.
2. Even when fire has done its very worst, one still has to resort to it.
3. When a soup is unpalatable, and the paste of the pounded yam that goes with it is not smooth, that is the time to know a man who loves to eat pounded yam.
4. A pad that breaks a pot of water does not remain on the head.
5. A bush fowls' playground is never appreciably spacious.
6. If the owner of a calabash calls it a worthless calabash, others will join him to use it to pack rubbish.
7. It is the boast of every juju priest that unless he dies, no thief can ever come to steal his juju away.
8. What affects the nose must also affect the eyes that must weep for it.
9. If a greedy eater is near a patient, such a patient can never survive.
10. There is no elephant that complains about the weight of its trunk. No elephant is burdened by the weight of its tusks.
11. When the elderly ones in a house travel, the younger ones quickly grow in experience.
12. It is when there is a stampede, that a person with big buttocks knows that he carries a load.
13. If a soup is sweet, it is money that cooks it.
14. If a child is not well-behaved, she is not sent by the mother to go alone to the market to buy things for her.
15. A glorious past is the work of a glorious man.


MISC
• The goat that cries the loudest is not the one that will eat the most.
• It is the self-love of the king parrot that made him become a talkative.
• The owl is the wisest of all birds because the more it sees, the less it talks.
• If gold rusts, what will iron do?
• A masquerade does not perform to an outside audience until he performs well at the home base.
• How can man be remembered when the giant trees in the forest are soon forgotten.
• Dead though the oil-palm may be, the maggot in it lives on.
• When a fire starts from the shrine, no precaution can be possible.
• Beetles that roll balls out of human faeces demand to be hidden away from the rich man, because there is nothing he wouldn't buy.
• Our elders quote the cock as saying that "it would not be good if one becomes the only person in the world, and that is why they crow every morning to show their number".
• A strong man is remembered on the day of the fight, and a gluttony on the day pounded yam is surplus.
• Beauty is not sold and eaten.
• A masquerade is not a spirit only because of its mask.
• When a woman prepares a dish which others find unpalatable, she says that she prepared it to suit her own taste.
• At a time a cockerel matures, it begins to crow to tell the world the time of day.
• They are the gods themselves that white-wash the fruits of the pumpkins.
• However much the world degenerates, man shall never find worms in salt.
• A diviner cannot accurately divine his own future.
• A lizard that fell from the top of a tree wastes its time looking back to where it fell from; if there was anything good the lizard deserved, it could not have missed it while it was there on top of the tree.
• It is what the eyes of one man sees that is described as a boa constrictor.
• Once a cock begins to crow, it never again becomes dumb.
• He whose throat is longer than his arm must pray constantly for gods' protection.
• It is he who has no place to call at that moves fast through life.
• No frog is tied by a rope to a pond.
• The fly that has no one to advise it follows the corpse into the grave.
• Everybody joins to blame or condemn a child who overthrows the pot of soup.
• Money has the capability of making people laugh; but when they laugh, the foolish ones sometimes forget to close their mouths.
• No one feels the pains that arise from unintended injury.
• The glow-works light the nights, but more so the night that their mother prepares porridge.
• When it is the turn of a man to become the head of a village, he does not need to diviner to tell him that he is destined to rule.
• It is for saying that he has no time that the monkey's body became over-grown with long hairs.
• Our elders say that at sunset, it is one's cloth that one goes to remove from the village square.
• The spirit that keeps one going when one has no choice of what else to do must not be mistaken for valor.
• It is the fortunate person that the physician undertakes to help.
• The gods may still send a gentle breeze when they want to bless us.
• Any wealth that takes only a market week to acquire is sure to contain in it things for which the gods will surely come to make claims.
• A crowd is like a smoldering log which can spark into a flame at any time.
• It is usual of a person found guilty in a trial to boast that he would press his case further.

Iphone mtn/zain/globacom/etisalat gprs/edge/3g configuration

There is a free utility on apple website for windows and mac users to andle this just google for
iPhone Configuration Utility and install the application after installation start the program the rest is easy

How to retrieve and display an image from MySQL using php

I don’t advise storing image on mysql as it only makes your server slower instead upload the image to a folder and send the image name to mysql

PHP Include Tutorial

PHP Include Tutorial – Basics Of The Include Language Construct
It should be noted that, much like the Echo statement in PHP, Include is not considered an actual function. Although it would behave like a function, we call it a language construct since it is “built into” PHP. We consider it an integral part of the language much like the IF statement! (You may notice some language constructs listed as functions- but this is only to improve documentation.)
The primary usage of this language construct in particular is to retrieve a remote file for inclusion into the currently running script. We are going to use the Include construct for three primary reasons:
1. Readability – We use the Include construct for replacing many lines of code with but one line of code. This increases the readability of an application, and ultimately lets us troubleshoot bugs quicker than ever before. We use the Include construct for replacing many lines of code with but one line of code. This increases the readability of an application, and ultimately lets us troubleshoot bugs quicker than ever before.
2. Save Time – We save time by using the Include() construct in a very ingenious way. If we were to change a link in our navigation menu, we would have to update that same link hundreds of time on different subpages. But if we used an Include() construct, we could just edit one file and the results on other pages would be instant!
3. Reliability – If an included file doesn’t exist or has malfunctioned, the server will tell us quite promptly. This is superb for troubleshooting! Error reporting is sometimes seen as a security risk, however, since it commonly shows semi-confidential information in the error.
PHP Include Tutorial – Examples Of Including A File
Before we can do dabble with an example, we need to learn how the Include syntax works. Using the Include construct is actually quite easy; we just need to know the URL of the code to be input, wrap it in parenthesis, and add the include statement.
An Example Of The PHP Include Syntax
include("header.php");
include 'footer.php';

// Each Way Is Correct, But The First Example Is More Readable
?>
In the above example we are calling to two different files, in which both are located in the same directory as the page being viewed. Both statements will work, but we personally like the first example since we view it as more readable.
If the file we wanted to include is in the parent directory, we simply use the “../” notation as seen below.
Including A PHP File From A Parent Directory
include("../header.php");

// Include A File From Parent Directory
?>
Note that every time we use the “../” notation we go up one level. But things don’t have to get complicated! We can simplify things by simply using the entire URL as seen below:
An Easier Way To Include A PHP File
include("http://www.YourUrl.com/includes/header.php");

// Easy File Inclusion
?>
PHP Include Tutorial – An Include Example
To get started we are going to need at least two files. First, we will take an already-made index.php file as seen below:
Contents Of index.php – Copy And Paste

A Basic PHP Website Using Include


Home
Subpage 1
Subpage 2



Welcome to our website! The links above are being used in includes- saving us time that can be best used for developing better features for this website.







Now create a file called “header.php” in another window. We are going to take out some of the contents of the index.php file and replace it with our include statement. Our header.php file should look like the following:
Contents Of header.php – Copy And Paste
Home
Subpage 1
Subpage 2
?>
Now we have two separate files. But we have a problem- how do we get the URLs from the header.php file into the index.php file? Simple! Review the code below to see where we put the include statement:
Contents Of header.php – Copy And Paste

A Basic PHP Website Using Include



include("header.php"); ?>




Welcome to our website! The links above are being used in includes- saving us time that can be best used for developing better features for this website.





Now upload both files to a same directory and test it out! If you’d like, you can change around the contents of the header.php file, upload it to your web server, and see the changes in real-time. This may not seem like a big time saver with only one page to use it on, but if we were to have a website filled with 100 pages, this would be quite the little time saver!
PHP Include Tutorial: Dealing With Variable Scope
Variable scope sounds like a mean phrase to anyone who doesn’t know what it is. The scope of a variable is just how far it “reaches”- or basically where it can and can’t be accessed. Variable scope can be seen when looking at two separate PHP scripts. If they are not connected in any way, then the variables of the first script will not interfere with variables in the second. (And vice versa)
We deal with scope in the Include construct quite simply because we are merging two files- so if we are using the same variable name in both scripts, which one gets precedence?
In our previous example we are not dealing with scope since we aren’t using any variables. But we can change that with the following edits to both index.php and header.php:
header.php – Edits To Show Variable Scope
$home = "Home";
$sub1 = "
Subpage 1";
$sub2 = "
Subpage 2";
?>
We just declared our three variables as our links, so that we may see which variables take precedence in our index.php file. Our index.php file should be updated as seen below:
Contents Of index.php

A Basic PHP Website Using Include




$home = "";
$sub1 = "";
$sub2 = "";
include("header.php");

echo "$home $sub1 $sub2";
?>



Welcome to our website! The links above are being used in includes- saving us time that can be best used for developing better features for this website.





So what do you think the script will output to the browser? As you can see, we declared each variable as an empty string before we included the file. But in the include of the file, we stated that the variables should contain links.
Upon testing this script, one can see that the output is going to be successful in displaying the correct navigation links. From this example it is seen that an included file will indeed overwrite variable values unless otherwise coded.
It should also be made clear that an include file is only going to have access to variables and functions that have been declared before the line used to include the file. In the following example we will declare a variable and reference it within the include file. (No need to test this out unless you want- you can easily see the results with the two short snippets below)
index.php – Testing Variable Scope
$hello = "hello world!";
include("echo.php");
?>
Now for the echo.php file:
echo.php – Testing Variable Scope
echo $hello;
?>
Once this script is run, we will see that “hello world!” is output to the screen. If we were to put the variable after the include line, we wouldn’t get any results at all.
PHP Include Tutorial – Two Major Security Concerns
PHP is considered a generally secure language since it hides the contents of the PHP code from the user. (Go ahead and view the source of the HTML of pages we have created- you won’t see PHP code!) If we take this protection away, anyone can see the contents of our scripts. Luckily you have to make the mistake of not using the PHP extension for this to happen.
It is sometimes common to see some use plain text or even a .INC file type for their includes. If you use the wrong extension or remove the PHP tags from the header.php file we were working with, you’ll notice that the plain text is output to the screen if you try to access header.php directly. This goes to show that when we use includes, always remember to use the PHP tags to enclose the data if it is using any type of sensitive data. (Or any time at all, since it builds good programming practice!)
The second major security concern is including files from a remote location. If we are only using local resources on our website, such as template files we have created, there is no reason to fret. But if we are pulling information from other websites, which is sometimes illegal in many cases anyway, the remote website can inject code into our websites and get confidential information with ease. As such, developers should only agree to use includes from remote resources if they are to be trusted without doubt.

Ref: learnphponline.com