Archive for category PHP

Understanding The Language Of The Web

Since you will find that newbies on the internet are creating their first website they find that the idea of using PHP codes a little challenging. HTML is so much easier to understand but it can only do so much. PHP scripts can help you make your website more user friendly. This also cuts down the time you need to manage your site. But you may feel like you are going to have to have someone else build that site for you. Not true! You can learn it for yourself.

Take a look at your web hosting account. You see that you have the ability to use PHP language on your website so why not use it. You do not have to build your site purely from PHP codes. Most website are built from a combination of HTML and PHP. All you need is a tutorial to help walk you through the set up. You will find that PHP codes look similar to Javascript codes. That means a few codes here and there you can have a site that collect important info, or sends visitors to pages that are password protected, even perform calculations and more. Now how much time would this cut off your work load?

Sure, their is nothing wrong with having a HTML website but as the internet keeps changing it will be nice to know that you can evolve with it. PHP is not something to mess around with if you do not know what you are doing. It can be hard to find the mistakes unless you know what the codes mean. But when it is done right you will have a website that looks more like the others.

Since we are on the subject of PHP script you may be wondering what is PHP in the first place. well it stands for “Hypertext Preprocessor” was known as “Personal Home Page” and it can be used on pretty much all types of servers. Created by Rasmus Lerdorf in 1995 to develope dynamic web pages. Now millions of webmasters have learned and created websites with this language. There is no reason why you can’t do the same.

MYsql database is commonly used with with PHP once the date feed is set up. You will find it quite useful as you create your website or update it. Don’t worry about not knowing what MYsql database is right now because you can learn that too. The codes give you a clean look and feel plus by being able to perform certain functions on it you make see more return visitors operating your site.

I hope you now see that you do not have to be afraid of using PHP on your website. You can find simple PHP tutorials that can real help you learn how to us it. You will like what you will be able to with your new website.

This is your time to start learning more about how you can have a better understanding of PHP then please visit PHP tutorials. If you would like to use your website to start a business then check out owning your own business.

Is it possible to spell check texts from php?

Yes as most other things spell checking is also possible from php, to do so you need to compile / activate the pspell/aspell lib. For an example of using the pspell lib from php read this article from zend http://www.zend.com/zend/spotlight/spellchecking.php

Although the pspell/aspell lib’s need installing on the server only –with-pspell needs to be added to the PHP configuration.

The following code seems to work :-


<?
// /home/username/dict/ Must be world read/write
//
$pspell_link = pspell_new_personal ("/home/username/dict/custom.pws", "en", "", "", "", PSPELL_FAST|PSPELL_RUN_TOGETHER);
$word = "spelllng";

echo “The word ’$word’ was not spelled correctly<P>”;

echo “Possible correct spellings are: <BR>”;
$suggestions = pspell_suggest ($pspell_link, $word);
for (
$i=0; $i < count ($suggestions); $i++)
{
echo
“Possible spelling: ” . $suggestions[$i] . “<br>”;
}

echo “<BR>”;
?>

Tags: , , , , , , , ,

Get google keyword

Google sends many visitors to your site, if you want to get the keywords they used to come to your site -

// take the referer
$thereferer = strtolower($_SERVER['HTTP_REFERER']);
// see if it comes from google
if ( strpos($thereferer, “google”) ) {
// delete all before q=
$a = substr($thereferer, strpos($thereferer, “q=”));
// delete q=
$a = substr($a, 2);
// delete all FROM the next & onwards
if ( strpos($a, “&”) ) {
$a = substr($a, 0, strpos($a, “&”));
}
// we have the results.
$mygooglekeyword = urldecode($a);
}
print $mygooglekeyword;

Tags: , , ,

  Domain Name + 1GB Linux India Web Hosting in Rs.349