Special Offer for Blog Visitors — $0.01/m web hosting

Unlimited disk space, unlimited bandwidth, unlimited domain names hosted with FFMPEG support: $10.20/month &mdash 75% discount — $2.55/month
Limited time special offer: Your first month for $0.01 (1 cent only!) — Learn more! — Hurry up, offer expires on Tuesday 31st of August 2010!

PHP programming shortcuts: save time and lines of useless code.

Posted: August 12, 2010 at 5:14 pm | (7) Comments

Before I even started writing this, I am sure that the comments will be filled about how consolidating code makes it hard to understand, more braces makes it easier to read, etc. This is for those who think it’s better to have less code, such as yours truly. I like seeing less code; I find it more efficient and much better.

Short-hand mathematical operators
Those are known by most programmers however missed by a lot, the following can be shortened by it’s alternative next to it.

$int1 = $int1 + $int2; -- or alternatively: $int += $int2;
$int1 = $int1 - $int2; -- or alternatively: $int -= $int2;
$int1 = $int1 * $int2; -- or alternatively: $int *= $int2;
$int1 = $int1 / $int2; -- or alternatively: $int /= $int2;

Counters
Here is another very simple one, but good to know for those who don’t know about it.

$int = $int + 1; -- or alternatively: $int++;
$int = $int – 1; -- or alternatively: $int--;

Short-hand print statements
Ever find yourself have to write so much just to be able to echo a variable in HTML? No more!

<?php echo $string; ?> -- or alternatively, <?=$string?>

Braces: you don’t always need them.
You don’t always need to use the braces in any if or while statement if it only containers one directive.

if ($x)
{
echo "is x";
}

Could just be

if ($x) echo "is x";

Ternary operator
My personal favorite, saves a lot of time and I still think it makes readable code

if ($type == 'human')
{
echo 'human';
} else {
echo 'robot';
}

Or why not..

echo ($type == 'human') ? 'human' : 'robot';

You can even set variables using that method

$type_of_person = ($type == 'human') ? 'human' : 'robot';

Verifying zero values not being false
Sometimes we deal with a function that can return a number and we want to make sure it returns a number, but if it returns 0, PHP will consider it as false.

if (getNumber()) { …. }

The number can return 0 and be as false, where as the following will not consider the integer 0 false

if (getNumber() !== false) { … }

Alternative control structure syntax
This is a great feature to do when you’re trying to do a lot of PHP work with HTML, it would be hard to list all of them but you can refer to it here: http://www.php.net/manual/en/control-structures.alternative-syntax.php.

Feel free to post any other ones in the comments section.. we all have that one trick we always use!

Green Web Hosting: Going the extra mile

Posted: June 13, 2010 at 12:01 pm | No Comments

There are plenty of hosts out there claiming to be green only by buying renewable energy credits and not by taking the correct measures of decreases their power usage. Sure, renewable energy credits sound like a smart idea of “fixing” what you have caused, however, the consequences of what has been created have already been done.

We think of green web hosting in a different matter. We believe that we can provide a great service and also truly and literally reduce our environmental impact, not just by getting credits. Inside our offices and our datacenter, we are constantly looking for ways of reducing power usage (the biggest issues when working with a lot of computers and servers!)

To start everything, electricity is provided to both our datacenters and offices from Hydro-Quebec. Hydro-Québec is a government-owned corporation that generates, transmits and distributes electricity in the entire province of Québec. With sixty hydroelectric stations, Hydro-Québec is the largest electricity generator in Canada and one of the world’s largest hydroelectric generating companies.
What this means is that all the power that we utilize is renewable hydroelectric energy that causes almost no pollution when being generated. However, we don’t just stop there, just because we get power from a renewable source doesn’t mean we can do whatever we’d like with it.

Inside our offices, we don’t use desktops anymore. On every desk, there is a Apple MacBook Pro installed with a 24” LED Cinema Screen. The amount of power that a laptop uses compared to a regular desktop is much less as well as it gives the ability for our representatives to grab their workstation anywhere they can go.

Instead of running Ethernet inside the entire office, we’ve opted for a 802.11N wireless network, they can reach speeds of up to 108Mbps and that’s more than needed for an office (no, we don’t use wireless networks on our servers ;]) therefore, less wiring, less mess and less environmental impact. Our telephone system is entirely VoIP and connected to each workstation, so there is no need for phones, we have softphones installed on every Macbook Pro.

However, most of our power savings come from our datacenters. Our datacenters are extremely well cooled therefore after experimenting with servers, we found that there is no increase in server temperature when setting the fan setting to “Acoustic”. The acoustic setting lowers fan speeds (and there are a lot of fans in a server!). Also, we have opted to use Intel’s SpeedStep technology that underclocks the CPU’s frequency when it’s idle, when there is load, it will clock it back to default speed to process with no performance difference. We have also made some experiments and we have seen a big decrease in power when using Intel’s LV (low voltage) series of CPUs, they have the same exact power however run at a lower voltage.

One of the biggest power saving methods we have is virutalization, we are a certified and authorized Citrix XenServer partner and using their virutalization services has permitted us to consolidate multiple physical servers to one or two virtualized physical servers for all of our internal services.

All this is done to lower energy costs to provide you a much affordable service and decrease our environmental impact. We hope you enjoyed reading this article and if you have any suggestions on how we can decrease power in our daily operations, feel free to do so! :)

How synonyms affect Google search results?

Posted: January 26, 2010 at 7:12 pm | No Comments

Google announced a big change in how to handle the search results via adding synonyms for words that can be used in search. This should affect the position of web pages in Google’s search results.

It is important that Google can deal with synonyms.
Google wants to show the best results for search. Because of that, it is vital that Google’s algorithm get to know the words which are used in the search. The best way to understand these words is to check the synonyms of them.

What are synonyms: They are words that have the same meaning, for example “pictures” and “photos”. People searching for “sunset pictures” are probably also interested in web pages that contain the words “sunset photos”. A problem is that words that can have different meanings. For example, the word “case” can mean “occurrence”, “instance” or “example”. It can also mean “box” or “container”. The word “guitar box” might be a synonym for “guitar case” but “O.J. Simpson box” is not a synonym for “O.J. Simpson case”. Google’s measurements show that synonyms affect 70 percent of user searches across the more than 100 languages Google supports.

The Changes Google made
Google’s official blog posted that they have improved the way that they detect synonyms. For example, the algorithm can now find 20 possible meanings of the search term “GM”.

GM can mean General Motors, George Mason in [gm university], gamemaster in [gm screen star wars], Gangadhar Meher in [gm college], general manager in [nba gm] and even gunners mate in [navy gm], etc.

Google also made a change to how the synonyms are displayed. The searched words and the synonyms are now displayed in bold in the search results. Web pages that contain only synonyms of the searched word can also be displayed in the search results.

Brand new, much more user friendly, PHP configuration manager

Posted: June 25, 2009 at 1:56 pm | No Comments

The PHP configuration feature, exclusive to vexxhost web hosting clients that use our shared web hosting or reseller web hosting services, allows you to modify any PHP settings, enable or disable modules such as Zend, IonCube, FFMPEG-PHP or phpShield. This allowed our clients to configure their websites instantly without having to go through the mess of going through php.ini files.

After hours and hours of designing and implementation, we are pleased to finally announce our new PHP configuration utility. Most of our clients found our previous PHP configuration utility to be very helpful and useful. However, the user interface was not very user friendly and it was hard to understand.

We have listened to all of our customer’s suggestions and now we have implemented the new system in all of our servers, as you may see, it’s a two-step process that happens all on one page. First of all, you select the directory to be configured from the left of the page, after you have selected the directory; all you do is click “Configure”. The system will contact our servers and verify your settings, and then it will display it for you, you may make any modifications you want and after you’re done, you click “Rebuild configuration” at the end of the page.

The new system is now very easy to use comparing to the previous one specially in pointing to directory because a drop down menu was not very user intuitive and not easy to understand, the new structured directory listing will help clear this up even more and not having to refresh the page every time you select a directory which will save bandwidth as well as make everything load faster.

This new system uses the latest AJAX technologies to get your configuration instantly from the server using JSON. This new system is just part of the upcoming new features that we’re giving a complete update to.

We are pleased to announce those new features and make sure our clients enjoy our high quality web hosting, yet very affordable web hosting for the low price at the same time. We have always introduced more features on our services without ever raising the prices. By upgrading all of our hardware to latest Xeon CPUs, upgrading RAM and ensuring most of ours servers have plenty of it at all times, implementation of RAID systems to ensure redundancy and speed, being one of the first in the industry to add R1soft CDP backup features, the recent introduction of our SiteBuilder, and another vexxhost web hosting client exclusive, InstantVideo Installer.

SEO Tips: For how many keywords should you optimize your web page?

Posted: June 25, 2009 at 1:33 pm | (3) Comments

Alright, you have just put the last minutes touches on the look of your new website, it’s been uploaded on to your favorite web host (vexxhost, obviously!). Now, you want some people to look at your web pages but don’t want to spend much. Introducing the world’s most efficient free, guaranteed, traffic: Search engines (such as Google, Bing – previously named Live – previously named MSN, Yahoo!).

If you get your website listed on any of those search engines, that’s an accomplishment, however, that’s just half the task because you won’t get any traffic on the 685th page. In order to get plenty real visitors that are looking specifically for your web page, you have got to get in the first pages on the search engine.

First of all, you have to do a research on what keywords you need to focus on optimizing your site on; this is very important, make sure the keyword you’re working with is not something that’s very vague. For example, if you try to be the #1 on Google on “blog”, well, good luck. The end result will be that you won’t get to #1 on keyword “blog” and you’ll have no traffic, if you focus on the keyword “car blog” instead, you have a much bigger chance into making it to the first page, while at the same time having very good traffic on your website.

Page 685 of “blog” with almost no traffic or Page 1-2 of “car blog” with decent traffic, your call.

Once you’ve picked your specific keywords that you want to focus on, what to do with them is very simple. The best way to gain placement and traffic on search engines is that to optimize each page of your website on a specific keyword.

Take for example that you are a web hosting company (coincidentally called vexxhost, too), then you would try to optimize one of your pages for the keyword affordable web hosting and another page for quality web hosting and so on. You’d also make sure that all the pages that have your plans/services are also optimized for the product itself, for example, Shared Web Hosting, Reseller Web Hosting, VPS Hosting, Dedicated Hosting, etc.

This will make it much easier to get a higher placement on search engines on those specific keywords, instead of those vague keywords that are very difficult to make it on the first page of, like web hosting.

Technology Partners