Tuesday, August 2, 2011

Hostgator Shared Hosting Insights - do you know them?




Are you using HostGator's shared hosting? I'm using Hostgator's Hatchling plan and I'm very happy with my sites. Total number of visitors recently went up to 8000/day but my sites were still fine.

For backups better buy one hotfile account where you can upload CPanel backups daily. Or you can use free ones with Megashare.

Do you know HostGator's online chat is free and is excellent and best in the world I've ever seen! Even before buying you can as well chat with their technicians who will make sure you leave happily.

Insights


Sending emails
We can send large emails from our accounts( even 27 MB is allowed). Run a cron job daily night which will zip and email you the backup of all your databases. You can use this php code to send your backup in attachment.
HostGator system times
They are fairly accurate and synced by NT
How can I change server timezone to that of my country?
The server timezone is by default set to Central Standard. We can change the timezone to that of our country's so that all the php code gets time in our country's timezone. Read more for information.
CPanel Backup limits
They won't run if the total file size in my home directory in more than 4GB or total number of files(inodes) is more than 100,000. Also CPanel full backup can also be restored.
Bandwidth
My one site is download site so I was not sure how much bandwidth HostGator will allow in my shared hosting account. I did have a good chat with them and I assume that even more than 5-7 GB may be allowed by HostGator. Here is the chat with HostGator technician about maximum bandwidth usage.

Also when I raised this question : "So I assume that 15 GB of data size isn't a problem with HostGator. Only that CPanel backup won't run; secondly if I take backup of 15GB of data and transfer it to remote server for backup so will 15GB be added in the bandwidth of my hosting account? What will be the side affects of this for my Hatchling account?" I got the following reply from HostGator technician:

Nothing, you have unlimited bandwidth.

Monday, August 1, 2011

Sending mail with attachment using PHP & SMTP on Hostgator

I've tested it on Hostgator command line and saved it in b.php. It is sending attachment correctly.





<?php
require_once "Mail.php";
require_once('Mail/mime.php');

$from = "contactusds@downloadformsindia.com";
$to = "rag.fjraggupta1@gmail.com";
$subject = "this is the message from your domain";
$body = "give your message body here";
$host = "mail.downloadformsindia.com";
$username = "contacdtus+downloadformsindia.com";
$password = "passwd";

$headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject);
$file="./a.php";
$crlf="\n";
$mime = new Mail_mime($crlf);
$mime->setTXTBody($text);
$mime->setHTMLBody($html);
$mime->addAttachment($file, 'text/plain');
//do not ever try to call these lines in reverse order
$body = $mime->get();
$headers = $mime->headers($headers);



$smtp = Mail::factory('smtp',
  array ('host' => $host,
    'auth' => true,
    'username' => $username,
    'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
  echo("
" . $mail->getMessage() . "
");
} else {
  echo("Message Sent successfully");
}
?>

Sending email using PHP/SMTP on Hostgator command line


If you want to send email from Hostgator command line there here is the working sample.
Just replace from email id, to email id, host,username and password.

<?php
require_once "Mail.php";

$from = "contactus@mysite.com";
$to = "to email id";
$subject = "this is the message from your domain";
$body = "give your message body here";
$host = "mail.mysite.com";
$username = "contactus+mysite.com";
$password = "pass123";
$headers = array ('From' => $from,
  'To' => $to,
  'Subject' => $subject);
$smtp = Mail::factory('smtp',
  array ('host' => $host,
    'auth' => true,
    'username' => $username,
    'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {   echo(" " . $mail->getMessage() . " ");
} else {   echo("Message Sent successfully"); }
?>

Sunday, July 31, 2011

Privacy Policy

Privacy Policy for http://webhostingworld2011.blogspot.com/

If you require any more information or have any questions about our privacy policy, please feel free to contact us by email at bhasker1@hotmail.com.

At http://webhostingworld2011.blogspot.com/, the privacy of our visitors is of extreme importance to us. This privacy policy document outlines the types of personal information is received and collected by http://webhostingworld2011.blogspot.com/ and how it is used.

Log Files
Like many other Web sites, http://webhostingworld2011.blogspot.com/ makes use of log files. The information inside the log files includes internet protocol ( IP ) addresses, type of browser, Internet Service Provider ( ISP ), date/time stamp, referring/exit pages, and number of clicks to analyze trends, administer the site, track user’s movement around the site, and gather demographic information. IP addresses, and other such information are not linked to any information that is personally identifiable.

Cookies and Web Beacons
http://webhostingworld2011.blogspot.com/ does use cookies to store information about visitors preferences, record user-specific information on which pages the user access or visit, customize Web page content based on visitors browser type or other information that the visitor sends via their browser.

DoubleClick DART Cookie
.:: Google, as a third party vendor, uses cookies to serve ads on http://webhostingworld2011.blogspot.com/.
.:: Google's use of the DART cookie enables it to serve ads to users based on their visit to http://webhostingworld2011.blogspot.com/ and other sites on the Internet.
.:: Users may opt out of the use of the DART cookie by visiting the Google ad and content network privacy policy at the following URL - http://www.google.com/privacy_ads.html

Some of our advertising partners may use cookies and web beacons on our site. Our advertising partners include ....
Google Adsense
Chitika
Kontera


These third-party ad servers or ad networks use technology to the advertisements and links that appear on http://webhostingworld2011.blogspot.com/ send directly to your browsers. They automatically receive your IP address when this occurs. Other technologies ( such as cookies, JavaScript, or Web Beacons ) may also be used by the third-party ad networks to measure the effectiveness of their advertisements and / or to personalize the advertising content that you see.

http://webhostingworld2011.blogspot.com/ has no access to or control over these cookies that are used by third-party advertisers.

You should consult the respective privacy policies of these third-party ad servers for more detailed information on their practices as well as for instructions about how to opt-out of certain practices. http://webhostingworld2011.blogspot.com/'s privacy policy does not apply to, and we cannot control the activities of, such other advertisers or web sites.

If you wish to disable cookies, you may do so through your individual browser options. More detailed information about cookie management with specific web browsers can be found at the browsers' respective websites.