Script

Facebook New Social Plugins

Facebook

With the launch of Facebook's New Graph API now you can add a variety of social plugins to your website with just one or two lines of HTML code. These social plugins by Facebook can really help you to promote your website or blog virally.

When user interacts with one of these social widgets on your website this activity gets listed in their Facebook News Feed or appears on their Facebook Wall. This is shared among friends of that particular user and the whole cycle just keeps on repeating itself eventually driving more traffic to your website. Plus these widgets give a more personalized experience to your users.

The new Facebook Social Plugins are listed below -

Read More

Create a Windows 7 or Windows Vista gadget

Windows 7

Windows 7 & Vista provide a set of very useful and handy desktop applications known as gadgets. You must be using them. Gadgets are lightweight HTML and script-based applications which can be used to provide some information or functionality to the user such as today's date and time. Wanna develop your own gadget for Windows 7 or Windows Vista? Lets start!

On the very basic level a gadget consists of mainly two files -

Read More

Generate PDF using PHP

php script

In this post we will show you how to generate a PDF using PHP. We will be using FPDF, a PHP class, to generate the PDF. Generating PDFs using PHP is very easy. Let's start right away.

First of all you need to download the FPDF class. Its absolutely free . Go to their download page and download the latest version. Right now the latest version is 1.6 you can download it directly from here. Once you have downloaded the zip/tar file uncompress it. You will find a fpdf.php file and font folder inside it along with other files. Copy this fpdf.php file and font folder to your root directory where you will be writing the code. Now we are ready for the real thing! Check out the example given below -

Read More

Javascript Redirect

javascript

You may need to use Javascript Redirect in following situations

  • You have a new and updated content and you want to redirect your users there.
  • You want to introduce some time delay to grab user's attention and then redirect him/her to a specific webpage.
  • You have got yourself a new domain name. 

Well you can easily do so with javascript. If you want to perform a simple redirect i.e. upon landing on your webpage the user should be redirected to some other page use the code snippet given below -

Read More

PHP Redirect

php script

This article will show you how you can redirect users to a new webpage instead of the original one using PHP. This technique is especially useful when you are website is down or you have moved your content to a new location and you want to redirect your users accordingly.

To redirect with PHP check out the code given below. Place this code on the webpage on which you want to perform redirection.

Read More

How to Get the Current Page URL

php script

In this post I will show you how to get the current page url as shown in address bar using PHP. Extracting the current page's url is very easy in PHP as it provides an array $_SERVER which contains information such as headers, paths, and script locations.

Read More

Count number of words using JavaScript

javascript

To count the number of words present inside a textbox or in a string variable is very easy and simple task. The trick is to use split() function of the Javascript. spilt() function takes delimiter as argument.

So we will be assuming that number of words is equal to the number of spaces present in the text and we will count the number of spaces present in the text using the split() function. Check out the examples given below.

Read More