TurfSite Manila

Internet + Computer = Life! (version 3.20 build update 21012012)

Looking for a Windows Server Website Hosting (Webhosting)?

Are you an ASP.NET developer? Are you looking for a Philippine-based website hosting provider for your Windows Server applications?

TurfSite Computing, Inc. (http://www.turfsiteph.net) is proud to announce the launch of their Microsoft Windows Server 2008 website hosting plans. Starting at PHP800 per year, you will enjoy a 1.0GB website hosting plan that fully supports both Classic ASP and ASP.NET applications. You will also have access in creating and managing your Microsoft SQL databases, as well as Microsoft Access and MySQL databases.

What’s good in subscribing with TurfSitePH.net is that you are not compelled to use your credit cards online, as they accept different payment channels such as over-the-counter bank deposit (thru BDO & UnionBankPH), via Globe GCash, and PayPal (if you really insist in using your credit cards as the norm of payment). And, they have an SMS hotline (0916.320.1513) if you want immediate attention for your concerns.

Adjusting WHMCS Time Zone

Ever since I started using WHMCS (Web Host Manager Complete Solution), my dilemma is that it uses the server’s timezone as its default. If a server is based outside of my local timezone, I have no choice but to adjust all of the transaction dates every time there is an entry at the WHMCS.

Now, here’s a trick to dictate WHMCS to use your local timezone:

  1. Open the file configuration.php for editing.
  2. Add the line date_default_timezone_set('Asia/Manila'); if you are from Manila.

The list of timezones can be found at http://www.php.net/manual/en/timezones.php

Interoperability at Microsoft

I attended a tech session over at the Microsoft Philippines HQ tonight, and guess what was the topic: PHP Interoperability on Windows. The session was conducted via Microsoft Office Live Meeting by Chris Ismael, who is based in Microsoft Singapore. Among the attendees are some familiar faces in the PHP Users Group Philippines.

So, what’s in store for the Open Source crowd from Microsoft. For one, it is not (or no longer) a sin to speak the “Linux” thing inside the HQ — just kidding.

Did you know that Microsoft already launched their Web Platform Installer 1.0 and 2.0 (Beta)? So basically, what are those, you may ask? They’re like “LAMP” or “WAMP” being distributed by Microsoft.

Also, Abet Dela Cruz (Microsoft Philippines) mentioned about the soon-to-be launched local Interoperability site http://www.interop.ph

Create a Site Counter Using PHP & MySQL

Ever wanted to create a simple hit counter for your site, but never had the chance to code it yourself? Then, you may simple use the code below — all hard coded by me, royalty-free. The code is used to teach non-techie people how to create PHP-MySQL-driven websites.

<?php
// connect to the MySQL server using 'localhost' as the server name, cPanel username & password
$con = mysql_connect("localhost","cpanelusername","password");
// check if the connection is established or not
if (!$con)
   {
      die('Could not connect: ' . mysql_error());
   }

// continue with the database processes if the connection is successful
else
   {
      // select the database you wish to connect to
      mysql_select_db("ctrdbase", $con);
      // go to the last record in your database table, this will also be the last number
      $result = mysql_query("SELECT * FROM counter_table ORDER BY ctr DESC LIMIT 1");
      $row = mysql_fetch_array($result);
      // store the last record to a variable
      $cctr = $row['ctr'];
      // declare a new variable that will do the addition thing
      $nctr = $cctr + 1;
      // store the updated counter to the database
      $sql = "INSERT INTO counter_table (ctr) VALUES ($nctr)";
      $dbupdate = mysql_query($sql);
      echo $nctr;
   }
mysql_close($con);
?>