Cool Ajax - Web Development Tutorial Blog

Category : How To

How To Allow Only Google Yahoo MSN bots

For getting index fast in various kind of search engine it’s very important to allow them in your website. Today we are going to learn how to allow them with just few lines of code.Lets get started- Open a robot.txt file and write followint code. This code allow only google, yahoo, msn bots crawling of your web contents. You need [...]


How to Detect AJAX Request using PHP

Detecting AJAX request is very useful, while your are working in AJAX based pagination. Last day worked in a project and I need to detect ajax or direct post request. Following script help me to detect AJAX request. Very simple but efficient script. if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'){ //If AJAX Request Then }else{ //something else } Was this information useful? [...]


Array flip and reverse in php

Flip and reverse sounds similar. Don’t mix-up them 🙂 array_flip function is useful when you only want to shift array index as array value and vice-verse. On the other hand if you want to change only array index in descending/reverse order then array_reverse function works great. Array flip convert key in to index and index in to key. $a = [...]


Simple way to define a custom error page using htaccess

A nice error page can make your website more user friendly. You know there are several kinds of error can occur in a web application or website and they have their own status codes. If you handle them smart way then it can create a good impression for your website. One of the most common and popular way for handing [...]


How to convert string in to slug using JavaScript

Today we are going to learn how to convert string to slug using JavaScript. We will write a custom JavaScript function called “convertToSlug” and it makes our string as a slug value. I’m sure enough, it will be a fun to create slug in JavaScript. Have a look at code snippet- /***************************************************** *@Description: Convert any string in to slug URL. [...]


How To Improve Web Application Performance

Web application performance is a great fact for application success. Mainly, website performance refers content loading speed. Now a days most of the time we use web application in mobile phone and visitors like to load those application that loads less than 3-4 seconds. So, that we should keep our content so light and make it super fast. Suppose, you [...]


How to Get Remote IP Address in PHP

From today I’m going to introduce a new section called “Quick Tips” in my website. Here, I’ll share php/css/js/jQuery/WP snippets. It will be a fun. Let’s get started- Quick Tips#1: Today we are going to learn “How to Get Remote IP Address in PHP”. PHP has built-in facility to detect remote browser or IP address and other properties. These values [...]


How to create a business card in Photoshop part 3

Hello everyone, welcome back to series tutorial on How to create a business card in Photoshop. In our previous lesson, we learn how to add effect on our business card. Today we are going to learn how to add text in card. As I told in my last tutorial that, if you have little bit idea about Photoshop and it’s [...]


How to create a business card in Photoshop part 2

Hello everyone, welcome back to series tutorial on How to create a business card in Photoshop. In our previous lesson we learn how to create card holder frame and card frame. Today we are going to learn how to add effect on our business card. As I told in my last tutorial that, if you have little bit idea about [...]