Category Archives: Search Engine Optimization

PHP function to get current web page full URL

PHP function to get current web page full URL & current page name.

Sometimes, you might want to get the current page full URL. Here is way you can do that.

* Function for get the full current website page URL
* @return string(full url of current website page)

function fullPageUrl()
$pageURL = (@$_SERVER["HTTPS"] == "on") ? "https://" : "http://";
if ($_SERVER["SERVER_PORT"] != "80"){
} else {
return $pageURL;


Get current page name.

* Function for just getting the current website page name
* @return string

function curPageName() {
return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);

Hope these functions will help you, leave comments if you found anything wrong  or these functions is not working on your page.

PHP function to generate SEO-friendly URL titles/slugs

Creating SEO-Friendly page URL from your Page Title / heading will very helpful to generate a highly optimized keyword rich URLs for your website, Here is the function to get the SEO-Friendly Page URL from given string.

* Return URL-Friendly string slug
* @param string $string
* @return string
function seoUrl($string) {

//Unwanted: {UPPERCASE} ; / ? : @ & = + $ , . ! ~ * ‘ ( )
$string = strtolower($string);

//Strip any unwanted characters
$string = preg_replace("/[^a-z0-9_\s-]/", "", $string);

//Clean multiple dashes or white spaces
$string = preg_replace("/[\s-]+/", " ", $string);

//Convert whitespaces and underscore to dash
$string = preg_replace("/[\s_]/", "-", $string);
return $string;


Search Engine Optimization & SEO rich Web Content Development

Search Engine Optimization (SEO) is the process of improving the ranking in the search engine it involves editing its content, HTML, Images.

Content is always king and it should be very relative to its specific keywords. Content portion itself of the web development process is vital to the overall success of the website and Google raking and PR.


Web Content is the main reason that people come to your Web pages but if your designs, architectures, and interactivity don’t provide that content they will leave.


Keep in mind that content is still king.

Basically, there are two types of Web Content:



Text Web Content
It’s the written content that’s on the page, both inside images and in text blocks. The best textual Web Content is that text that has been written for the Web, rather than simply copy-and-pasted from a print source. Textual Web Content will also have good internal links to help readers get more information and aid in scanning the text. Finally, Web text will be written for a global audience as even local pages can be read by anyone around the world.


Multimedia Web Content
The other type of Web Content is multimedia. To put it simply, multimedia is any content that isn’t text, but it includes the following.










Images are the most common way to add multimedia to websites. Images on Web pages should be optimized, so that they download fast as it affect the site load speed.


Animation can be created using GIF images or using Flash, JavaScript, Ajax or other animation tools.


Sound is embedded in a Web page so that readers hear it when they enter the site or when they click a link to turn it on. Always keep in mind that sounds on Web pages can create frustration, especially if you turn it on automatically and don’t provide any way to turn it off easily.


Video is getting more and more popular on Web pages. But it can be challenging to add a video so that it works reliably and well across different browsers.


What should be there in your Web Content?


1)  It should be very simple, lucid and easy to read and understand.


2)  It should be original content (no copy-paste).


3)  Search Engine prefers the grammatically correct content first.


4)  Use optimum keywords and LSI (Latent Semantic Indexing) keywords after proper keyword analysis.


5)  Web Content should be written after proper SEO analysis.


Hope the above article will help you to write the content more SEO friendly & rich.


The Best Web Search Engines List

There are so many search engines available on Internet.
Most of the users want only a single search engine that delivers basic key features as


  • Relevant results (results you are actually interested in)
  • Uncluttered, easy to read interface
  • Helpful options to broaden or tighten a search
  • Quick response (less time consuming)

I prefer Google.Google is fast, relevant, and the largest single catalog of Web pages available today
Below are some other Search engines available, these are also used very much by the people.

Alexa Rank : 27
Estimated Unique Monthly Visitors : 165,000,000

Alexa Rank : 4
Estimated Unique Monthly Visitors : 160,000,000

Alexa Rank : 52
Estimated Unique Monthly Visitors : 125,000,000

Alexa Rank : 64
Estimated Unique Monthly Visitors : 33,000,000

Alexa Rank : 118
Estimated Unique Monthly Visitors : 19,000,000

Alexa Rank : 1640
Estimated Unique Monthly Visitors : 4,300,000

Alexa Rank : 3617
Estimated Unique Monthly Visitors : 2,900,000

Alexa Rank : 6358
Estimated Unique Monthly Visitors : 2,700,000

Alexa Rank : 3038
Estimated Unique Monthly Visitors : 2,600,000

Alexa Rank : 1862
Estimated Unique Monthly Visitors : 2,000,000

Alexa Rank : 5903
Estimated Unique Monthly Visitors : 1,450,000

Alexa Rank : 4422
Estimated Unique Monthly Visitors : 1,150,000

Alexa Rank : 7676
Estimated Unique Monthly Visitors : 700,000


Note : All the above data related to search engines have collected on dated 03/31/2012.


SEO Tips to Improve Your Website’s Google Ranking & Website Traffic

Boost your website in major search engines by following some SEO tips as below:


1) Website content is the most important for SEO.Good, well-written (spelling and grammatically) and unique with quality content that contain your primary keyword and phrases always hike your site ranking.But Search engine prefer natural language content 🙂 Don’t try to mix so much your text with keywords.


2) Create a network of quality back-links using your keyword phrase as the link i.e. if your target is ‘Scriptarticle’ then link to’scriptarticle’ instead of ‘Click here’ link.Not only should your links use keyword anchor text, but the text (description text) around the links should also be related to your keywords.


3) You must have a unique, keyword focused Title tag (h1) on every page of your site.If optimizing blog posts; optimize your post title independently from your blog title.Focus on search phrases, not single keywords, and put your location in your text (‘Our Jaipur Centre’ not only ‘Our Centre’) to help you get found in local search.


4) When link building, think quality, not quantity. One single, good and authoritative link can do a lot more for your site than a dozen poor quality links.Links from a high Page Rank site are good as high PR indicates high trust, so the back links will carry more weight age.


5) Give each page a focus on a single keyword phrase. Don’t try to optimize the page for several keywords at once.


6) Check for canonical issue i.e. and non-www domains. Decide which you want to use and 301 redirect the other to it. In other words, if you prefer, then should redirect to it.


7) Frames, Flash and AJAX all share a common problem – you can’t link to a single page. Spiders or Crawlers can crawl text, not Flash and images. Don’t use Frames at all and use Flash and AJAX as less as you can for best SEO results.


8) If you want a new website to be spidered, submitting through Google’s regular submission can take many days. The quickest and easiest way to get your site crawled is by getting a link to it through another quality site.


9) SEO doesn’t matter if you have a weak or non-existent/dead call (href) to action. Be sure your call (href) to action is clear and present.


10) Optimize the text in your RSS feeds just like you should with your posts and web pages. Use descriptive, keyword rich text in your title and description.


11) Use captions and alt tag with your images. As with newspaper photos, place keyword rich captions with your images. A lot of searches is for a keyword plus one of those words.


12) Good global navigation and linking and paging will serve you much better than relying only on an XML Sitemap.


13) During link purchase or exchange, check the cache date of the page where your link will be located in Google.Search for ‘cache:URL’ where you substitute ‘URL’ for the actual page. If the page isn’t there or the cache date is more than an month old, the page isn’t worth much.


14) You must be sure that your URLs reports of server headers have ‘200 OK’ status or ‘301 Moved permanently’. If the status shows anything else, check to be sure your URLs are set up properly. You can find online tool for checking server header.


15) Social marketing is a part of SEO.As more you understand about sites like Twitter, Facebook, LinkedIn, Digg, etc, the better you will be able to compete in search.


16) Some of your most links has not appeared in web sites at all but be those in the form of e-mail communications such as newsletters.


17) Add all components to your Blog website like reviews, sharing functions, ratings, images, visitor comments, photo gallery etc.


Googlebot & Site Crawl

Advice Googlebot (Google) To Crawl Your Site


Googlebot is a Google’s web crawling bot or spider. This collects data from the web pages to build a searchable index for the Google search engine. Crawling is simply a process by which Googlebot visits new and updated pages, It uses an algorithmic programs determine which sites to crawl, how often, and how many pages to fetch from each site?


As Googlebot visits website it detects links (src and href) on each page and adds them to its list of pages to crawl. New sites, changes to existing sites, and dead links are noted and used to update the Google index.


If a webmaster wishes to control the information on their site available to a Googlebot,they can do so with the appropriate directives in a robots.txt file, or by adding the meta tag


<meta name=”Googlebot” content=”nofollow” />


to the web page.


Once you’ve created your robots.txt file, there may be a small delay before Googlebot discovers your changes.


Googlebot discovers pages by visiting all of the links on every page it finds. It then follows these links to other web pages. New web pages must be linked to other known pages on the web in order to be crawled and indexed or manually submitted by the webmaster.