Things You Should Know Archive

Offline Gmail – Now Clean Your Inbox even when you are offline

gmail

Recently i was browsing through Google APP store and went through Chrome app for offline gmail.  I normally travel a lot and in most of the time there is no internet connection, this is the best time to clear all my unwanted email’s , this App do the same for you, even you are not connected you can still manage your old mails. You can easily delete group mail’s, move to specific folder and do much more.

How to use it ?

Well simple just visit https://chrome.google.com/webstore/detail/ejidjjhkpiempkbhmpbfngldlkglhimk?hl=en-US&ct=author install this app and its done.

 

How to make my website faster ? ( Mod_Deflate )

php_code-300x193

We have been asked several time by our customer about the way they can make there website faster.
Normally any hosting company recommend upgrading there plan / buying VPS and other stuff, But do you or your website really required this kind of upgrade ? Maybe yes or no, The answer could be anything but you can  always start with some simple step to make your website.
We have started writing a series of article for giving you tips on how to make your website faster.

In  this article we will talk about Mod_Deflate :

Note : mod_deflate will only work in linux server.  All our linux hosting plan are pre configured and does support “mod_deflate”.

What is mod_deflate ?

mod_deflate help Apache2 to compress data before delivering them to client (browser), it can compress your data upto 40 % of original size, helping your visitor to browse your site faster and save there bandwidth.

As a shared linux hosting user, You dont have to do anything as all our linux hosting plan are pre-configured for this kind of compression. If you are our dedicated server user and want to enable to feature, then you can contact our support for the same.

in our next article we will talk about  mod_gzip.

How to create account in WHM (For Linux Reseller)

whm-cpanel-vps-for-web-hosting-resellers

The following article explains how to create a new cPanel account in WHM.

1.Login to your WHM account and click on account functions > Create New account.

2.After Clicking on Create new account under account function option of Cpanel, Enter the details of new doman in Doman information.

3.Next option is Package. Select the appropriate package if have created any packages.



4. If you haven’t created any package then you can assign the resources manually by clicking ‘Select Options Manually’ option

5.Next step is to set up Reseller settings, Nameserver and mail routing settings.


6. Click on create.

New cpanel account will be create. you have to point your domain name to name server provided to you, and it should now function properly.

Live Chat Review – NetSpaceIndia

Live Chat Review – NetSpaceIndia

I was just looking into our live chat report and i was happy to see so many positive respond from our happy customers. (Above, is a screen shot ;-) )

How to create custom 404 error page with cPanel

error page1
In our last post we wrote about best of 404 error pages, In this post we will explain about the process of creating the same.
IT takes only few minutes to create custom 404 error page with cpanel.  I will show you how to get a custom 404 page on your webste with the help of cPanel.
You can create custom 404 error page by using following steps.
1.Login to your cPanel.
2.Type “Error pages” in the Find text box.
3.Click on the “Error pages” option.

error page

4.Following screen will be load.

5.Select 404(Not found) option.

It will open new window with plan text editor, where you can put the contents of your error page.

If you want to have a simple, quick and easy custom 404 page all you need to do is enter one or more of bellow variables which you can see at the top of text editor and some basic HTML such as a header or a paragraph with suggestions for your visitor.

Referring URL – <!–#echo var=”HTTP_REFERER” –>
Visitor’s IP address – <!–#echo var=”REMOTE_ADDR” –>
Requested URL – <!–#echo var=”REQUEST_URI” –>
Server Name – <!–#echo var=”HTTP_HOST” –>
Visitor’s Browser – <!–#echo var=”HTTP_USER_AGENT” –>
Redirect Status Code – <!–#echo var=”REDIRECT_STATUS” –>

5.Now click on save.

6.Open browser and type invalid url for your website to see your new custom 404 error page.

You can find the same in our Knowledge Base at http://www.netspaceindia.com/kb.php?sno=183

Best Of 404 Error Pages

Copie_de_omega_erreur404_EN

“404 Page Not found”, is the most common page on any website, sooner or latter webmaster has thing about this. Even the internet giant has to think about it, Have a look at http://www.google.com/shashikant.

So, Why you are not thinking about it ? Here are some cool images for your own custom “404 page not found” url.

To know about the process of creating custom page in cpanel please follow http://blog.netspaceindia.com/2011/03/08/how-to-create-custom-404-error-page-with-cpanel/

Server Windows 2008 (Managing Dedicated Server)

Server Windows 2008

just brought a Windows Dedicated Server for your website from nespaceindia ? here are some quick way to manage it.

First thing let me list some of the feature which is included in your server powered by windows 2008 which is most important factor for your website hosted in this server (Please note : we are just listing basic tools only):

1.  IIS 7.5 : This release comes with many bug fixes which was there in IIS-7

2 Network Access Protection : Its a new tool also know as (NAP)  which enable you to manage control access to your network resources.

3.  RDM : This feature enable to manage your server remotely, it give a looks and feel of  having access to the machine physically.

4.  Windows PowerShell : Trademark by Microsoft, is much link a cron job in linux.

Listed above are just some of the features of Windows 2008 Server R2.

Now for hosting your first web site, in your newly installed server, you need to either manage it from IIS or you can install any Control Panel available.
Managing your site through IIS is the one of the option, Its highly recommend to have your server installed with control panel but if you want to save some money on it, Then you can follow this steps :

But before we guide about hosting a site on your IIS7.5 windows 2008 based Server you need to be familiar with terms like :

a.) SITE : It will tell IIS about the top-level domain name and path of its virtual directories.

b.) Binding : Its a type combination of different protocol which in layman term mean binding your site with FTP,WCF’s and other types of protocol.

c.) Application :  Act like a container for your application like php /asp.net.

The best thing about II7.5 is that, it come with a “default web site”  which is already configured. Which is actually your localhost, If you enter http://locahost from your RDM it will show up the default site but this will not be accessible from remote PC.

To create your own website from IIS, follow this steps :

1. Login to your server, windows 2008 and goto start >> Administrator Manager >> IIS

2. click on the (+) sign, in front of your server name.

3. You will get a folder icon named “sites”.

4.  right click on the icon you will get add website >> a new box will come in which will ask you to enter :

4.a) sitename : (Your domain name, eg: mysite.com), a application pool name will also created for this domain.
4.b) Physical Path :  is your actual path of your site file, in which you will store your website files.
4.C) HostName : your actual domain name like mysite.com.

And thats it, you are good to go. Just create a DNS entires and your site should be live. To know how to modify your domain name, name server follow our knowledge base of Changing Name Server

The next method will be getting a control panel downloaded and installed in your server, If you have ordered a server with pre-installed control panel then you dont have to go and manage your IIS every time you want to create a domain name hosting.

In my next post i will explain some of control panel available with “Windows Server 2008″ in more details, So do follow me.

How to start your own tinyurl (For Dummies)

url-short-service

Ever wanted to start your own tiny url website ? This post is for the people who wanted to start there own tiny url or shorten url service with minimum technical knowledge.

In this example we have taken a example of http://tinurl.co

What is required ?

You need a domain name (really short) and a linux shared hosting service a basic knowledge of PHP, Mysql and Apache.

The web site structure
For creating a tiny url like website you need five files in total :

1: Index.php :

This is your main page, which ask user for the main url or long url to shorten the same.

2: random.php :

This file will create a shorten url for the entered long url.

3: redirect.php :

This is a standalone file which will actually do the redirection to long url when user refer the shorten url.

4: .htaccess

.htaccess file tell the apche server how to treat some special request like 404 error or any redirection and much more. In this case it will tell the apache server about the redirection method to use for shorten url.

5:  db.php

Over here we will store the database connection for mysql.

The Mysql Structure :

This is very simple database structure i ever used. There is only one table here which i named as  ” link ” because it will store all the requested long url and there shorter form.

The Table structure will have three fields :

1: sno

A auto increment field int value, this will your primary key.

2. actualurl

This field with VARCHAR type and limit of 255 will store the actual long url entered by the user.

3. tiny

As the name implement it will store the shorten form of entered long url.

Ok, now lots of theory is done here lets work on the coding part, I will go page wise :

db.php

<?php
 
$my_host = 'localhost'; // your host here
 
$my_user = 'db_username'; // your database url
 
$my_pass = 'db_password'; // your database password
 
$my_database = 'db_name'; // your database name
 
// database connection string
$conn = mysql_connect($my_host, $my_user, $my_pass) or die  ('Error connecting to mysql');
 
@mysql_select_db("my_$database") or die( "Unable to select database");
 
?>

index.php

<?php
include_once('db.php'); // making the db connection
 
?>
<!--  java script to verify the user input like it should be with http:// -->
<SCRIPT LANGUAGE="JavaScript"> 
 
function Validate(form) {
    var v = new RegExp();
    v.compile("^[A-Za-z]+://[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/.=]+$");
    if (!v.test(form["textfield"].value)) {
        alert("You must supply a valid URL.");
        return false;
    }
} 
 
</SCRIPT> 
 
<body topmargin="0" leftmargin="0">
<table width="100%" border="0">
  <tr>
    <td height="64" colspan="2" bgcolor="#003333"><h1 class="style2">URL shortener tools</h1></td>
  </tr>
  <tr>
    <td width="7%">&nbsp;</td>
    <td width="93%">
 <?php
 if($_POST[textfield] != '')
 {
 
 include_once('random.php');
 $query = "select * from links where actualurl ='$_POST[textfield]' limit 1";
 $result = mysql_query($query) or die(mysql_query());
$count1 = mysql_num_rows($result);
 if($count1 =='0')
 {
  mysql_query("insert into links (actualurl,tiny) values ('$_POST[textfield]','$pwd')") or die(mysql_error());
 
  }else
  {
  	while($row = mysql_fetch_array($result))
	{
 
	$pwd = $row[tiny];
	}
 
  }
  ?>
    <table width="60%" border="1" align="center">
  <tr>
    <td>
        http://tinurl.co/<?php echo $pwd; ?> <a href="http://tinurl.co/<?php echo $pwd; ?>" target="_blank"><img src="images/bullet1.gif" width="8" height="9" border="0" /> </a>      </td>
  </tr>
</table>
    <br />
    <?php
}
?>
 
    <form id="form1" name="form1" method="post" action="" onSubmit="return Validate(this);">
      <table width="75%" border="0" align="center">
        <tr bgcolor="#CCCCCC">
          <td colspan="2"><span class="style1">Enter Your URL Bellow :</span></td>
          </tr>
        <tr>
          <td width="24%">Your Big URL with http://</td>
          <td width="76%"><label>
            <input name="textfield" type="text" id="textfield"  size="50" />
            <input type="submit" name="button" id="button" value="Submit" />
          </label></td>
        </tr>
        <tr>
          <td colspan="2"> Custom Link   http://tinurl.co/
            <label>
            <input type="text" name="c" id="c" />
            (Optional)</label></td>
          </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
      </form>
    </td>
  </tr>
</table>
</body>

3: random.php

<?php
$min=3; // minimum length of url
$max=4; // maximum length of url
$pwd=""; // to store generated url
 
for($i=0;$i<rand($min,$max);$i++)
{
 
	// to see if the entered url is already present in db
	$query = "select * from links where tiny ='$pwd'";
	$result = mysql_query($query) or die(mysql_error());
	$count_db = mysql_num_rows($result);
	if($count_db =='0')
	{
		$num=rand(48,122);
 
	  if(($num > 97 && $num < 122))
	  {
		  $pwd.=chr($num);
	  }
 
	  else if(($num > 65 && $num < 90))
	  {
		  $pwd.=chr($num);
	  }
 
	  else if(($num >48 && $num < 57))
	  {
		  $pwd.=chr($num);
	  }
 
	  else if($num==95)
	  {
		  $pwd.=chr($num);
	  }
 
	  else
	  {
		  $i--;
	  }
  }
}
 
//echo $pwd; // prints the password
 
?>

4. redirect.php

<?php
  require("./db.php");
 
  $short = $_REQUEST['short'];
 
    $query = mysql_query("SELECT * FROM links WHERE `tiny`='".mysql_escape_string($short)."' LIMIT 1");
    $row = mysql_fetch_row($query);
 
    if(!empty($row)) {
      Header("HTTP/1.1 301 Moved Permanently");
      header("Location: ".$row[1]."");
    } else {
      $html = "Error: cannot find short URL";
    }
 
  mysql_close($db);
?>

5: .htaccess

RewriteEngine on
 
RewriteCond %{HTTP_HOST} ^www.tinurl.co$
RewriteRule ^/?$ "http\:\/\/tinurl\.co" [R=301,L]
RewriteRule ^(\w+)$ ./redirect.php?short=$1

I hope that you enjoyed reading this post and you will be now able to start your own tiny url website. Enjoy ….

To get your domain name registered and linux hosting your can visit NetSpaceIndia.com

Send Link and info from google chrome to phone

google-chrome-to-phone-e1281636755525

Are you in love with Google Chrome and Your Google Powered Android Phone ? This this a must have tool for you.
Ever wanted to save a quick link, images or even a map to your phone ? then this the application for you.

Using Google Chrome to Phone Extension you can simple send links or any information from your PC / Laptop to your phone directly without any wire or Bluetooth.

For the Android app, please search for ‘Chrome to Phone’ in Market or point your mobile browser at http://market.android.com/details?id=com.google.android.apps.chrometophone
For the Chrome extension, please search for ‘Chrome to Phone’ in the Chrome Extension Gallery (http://chrome.google.com/extensions)
Note: Only Android 2.2 and Chrome 6 and above is supported.

For the Android app, please search for ‘Chrome to Phone’ in Market or point your mobile browser at http://market.android.com/details?id=com.google.android.apps.chrometophone
For the Chrome extension, please search for ‘Chrome to Phone’ in the Chrome Extension Gallery (http://chrome.google.com/extensions)
Note: Only Android 2.2 and Chrome 6 and above is supported.

I hope this will save lots of time for all google lovers ;-)

Connect to remote MYSQL hosted on Linux (Cpanel)

back-up-remote-mysql

Ever wanted to connect remote mysql ? Bellow is steps for connecting to your remote mysql hosted in Linux Cpanel.
before continuing i am assuming that you have successfully created a mysql db and the user for it.

1. Login to your cPanel with the username password provided.

2. Click on the Remote Mysql option which is  under Databases tab.

3. Type the ip address or FQDN of the server or the pc from where you are accessing database of this cPanel account in Add Access Host’s text box. If you do not know your PC IP then visit www.whatismyip.com to get your PC IP

4. Click on Add host.

5. Add your PC IP address.

5. Now open your MYSQL Client

6. Enter your server IP, with your database username and password.

It should now connect you to your remote MySql database.

Page 1 of 3123