PHP Web Host /blog Software / Web development related blogs! Wed, 29 Sep 2010 05:25:40 +0000 en hourly 1 http://wordpress.org/?v=3.0 Create your own free website in minutes /blog/web-development/seo/create-your-own-free-website-in-minutes/ /blog/web-development/seo/create-your-own-free-website-in-minutes/#comments Tue, 06 Jul 2010 17:43:31 +0000 jsmcm /blog/?p=138 Need a good looking website but you don’t have time to learn how to create your own one, and you’re on a tight budget? Don’t know too much about on-page SEO, except that its important? While this used to be a real problem, we’ve got a great solution for you.

We have developed easyCMSlite, the free, easy content management system. easyCMSlite is, as its name implies, a lite content management system. That is, lite, yet powerful. We’ve tried hard to take away the complexities of so many of the CMS systems available. I personally have tried using some of them, and I couldn’t fathom them. I am a web / software developer, so I can’t imagine what it must be like for non technical users.

easyCMSlite avoids that. For instance, to add a new page, you don’t need to be in some admin menu where you add text to a list. In easyCMSlite, you are in the actual web page, and when you want to add a page you see it as it would appear to your users. This is termed ‘What you see is what you get’ (WYSIWYG).

Another important consideration is SEO (Search Engine Optimisation). This is the important task of optimising your website so that the search engines can find you faster and hopfully rank you higher. Most CMS do have SEO capabilities, but you need to download and install plugins for that, then you need to configure and enable them. For instance, many CMS’s allow you to install a plugin to convert the URL’s they produce to one which is search engine friendly (and human friendly). So, using a plugin, you might be able to change your url from www.yoursite.com?cat=12&subcat=6&pid=34 to www.yoursite.com/category/sometitle.php. With easyCMSlite, this is automatic. If you have a main menu item called ‘Products’ and a product page you are linking to called ‘widget’, then your URL will be www.yoursite.com/products/widget.php. This is automatic and requires no plugins or configuration.

easyCMSlite has an easy to use text editor, very similar to word and excel. In fact, you should be able to copy and paste most content from word or excel into this editor, making  it even easier to manage your site.

To give easyCMSlite.com a try, go to easyCMSlite.com, the free, easy content management system, or go to www.demoserver.co.za to test the CMS in a live test environment. The username is [email protected] and the password is demo.

]]>
/blog/web-development/seo/create-your-own-free-website-in-minutes/feed/ 0
What to expect from the Gautrain service /blog/general/what-to-expect-from-the-gautrain-service/ /blog/general/what-to-expect-from-the-gautrain-service/#comments Sat, 26 Jun 2010 09:42:46 +0000 jsmcm /blog/?p=123 I needed to go to Sandton today (Saturday) to drop something off with a friend who lives directly across the road from Sandton City. I decided, having heard so many positive reviews of the gautrain, that I would take the train to see for myself.

I arrived at the Rhodesfield station in Kempton Park at about 08H00. The first thing which struck me was how helpful everybody was, from the moment I arrived at the boom gate to enter the parking lot. I asked the guard about the payment method etc, and he was friendly and helpful.

Once I got into the building I was greeted by more friendly staff who help you with the purchase process. I have no doubt they are not permanent fixtures, being there only to aid and assist in the initial periods. But they were so friendly and very helpful.

I got my card and went to wait on the platform for the train. Either through sheer luck, or efficiency of the service, the train arrived within about 2 minutes of me having arrived on the platform (the same was true on my return journey).

The stations as a whole are very clean and neat. The trains even more so. Carpeted isles and padded seats. The only problem is that it does not have overhead hand rails if you want to stand. I guess they don’t want people to stand, but if you’ve been on other undergrounds during peak times you’ll know that that’s not really practical.

The view is certainly different. Its not exactly a beautiful view, we’re still just in Johannesburg, but its a view that you wouldn’t normally get to see, particularly at the Marlboro Station, being raised as high as it is.

Having arrived at Sandton a few minutes later I got off the train and headed to the exit. I try to stay fit, so I try to avoid escalators and lifts. I didn’t however realise just how deep the station was. Its not that deep that I’d discourage you from taking the stairs, its just that you shouldn’t start at the bottom of the stairwell in a sprint like I did. By the time I got the the last level I was just about dragging myself up by the hand rail.

From the station its a 5 minute walk into Sandton City.

On the trip back, the driver announced that we were traveling at a speed of 160Kms/hours (100 Miles / hour if my conversion is anything to go by). It honestly felt more like 80kms / hour. The ride is just that smooth. When I arrived back at Rhodesfield just after 10H00, the queue for tickets was really long,  going right out of the door. Good thing I’m an early riser!

The trip was really amazing. I’ll certainly be using the service more, particularly when the Pretoria lines open. Also, with SANRAL now tolling just about every piece of highway the can lay claim to, I’m sure it will be far more economical than road travel. Of course, the 5 or 10 minute walks to and from stations will do your health the world of good too.

Gautrain Improvements I’d Like to See

In spite of it being an already great service, I think there are one or two small thing they can do to drastically improve the service.

1) Allow users to register online. If we could register online, and enter the gautrain card number on our profile, we could view our account balances, add funds online etc. This would be a great feature. When I got back to Rhodesfield at about 10H00, they queues for people loading funds were out the door. If I could add funds myself online, I could avoid the queues and walk straight to the platform

2) Better signage. The signs at Gautrain are a little lacking. Its not obvious when you get onto the platform where you need to stand for which line. Its also not very clear which cars you need to get into (some cars are reserved for airport use). There are loads of gautrain employees to assist at the moment, but in peak times they can’t help everyone.

3)The Sandton station should have clear signs to get to Sandton City. It would in fact be much better if they could add an entrance directly opposite to the current one as I suspect (without having done any investigation), that that would put you onto the road running directly past Sandton City.

4) Better travel plans. Their weekly pass is not really cheaper than their daily rate. The reason I say that is because their weekly pass gives you 14 trips. I know that that is 7 days return, which is a weekly pass, but they should consider having a weekday weekly pass. Its quite conceivable that people would want to travel to work, Monday to Friday, but not over the weekends.

Quotes Overheard on the Train

I overheard one or two comments on the train (not that I was trying to listen in…. ok, maybe a little).

  • One person was taking his family (mother, father, uncles, whatever) to Sandton. He works in Sandton and now uses the train to work. He was so proud of the service that he was bragging about it like it was all his idea. At one point he said, “dit maak my so trots op Suid Afrika” (“It makes me so proud of South Africa”). Ditto!
  • Another lady was there with her husband and the two cutest little girls. The one girl was so excited when we went “under the tunnel”, and even when we were “over the tunnel” (the ramp up to the Marlboro Station). At the Marlboro Station, there was a train next to us on the other line. This lady looked at some of the people in the next train and said, “Oh, look, they’ve already got the London Underground look on their faces!”. I guess the novelty has worn off for some, or, perhaps they just express their excitement in a different way. (PS, her husband had a decent looking camera and had taken a fair number of pics. I asked him to mail me some which he said he would do, so I’ll post them here once I get them).

Advice for First Timers

The best advice I guess is just go and see it for yourselves. As I mentioned, at about 10H00, the ticket queues are long, so get there early, before 08H30 if you can. Even if you don’t use the service then, just load money onto your card so when you do use it, you just walk in.

Listen to the comments on the train. I know, I know, its kind of rude to listen to people’s conversations, but this is not exactly a private environment, and I think the positive vibe is well worth getting involved in!

If you have any pics, stories or comments / improvement suggestions, please feel free to post here.

See you on the train!

Gautrain Arrival

Gautrain Arrival

Rhodesfield Gautrain Station

Rhodesfield Gautrain Station

Gautrain Rhodesfield Station Platform

Gautrain Rhodesfield Station Platform

Kempton Park Power Station

Kempton Power Station

Rhodesfield Station

Rhodesfield Station

]]>
/blog/general/what-to-expect-from-the-gautrain-service/feed/ 0
Protect your PHP code by obfuscating it! /blog/web-development/protect-your-php-code-by-obfuscating-it/ /blog/web-development/protect-your-php-code-by-obfuscating-it/#comments Thu, 24 Jun 2010 17:12:27 +0000 jsmcm /blog/?p=120 The ionCube PHP Encoder makes it easy to protect your PHP files from easy observation, theft and change. With optional licensing features built in, licensing your scripts to control which server your code runs on is easy too, and you can even give your files a time expiry!

Available in three versions, Basic, Pro and Cerberus, all versions offer bytecode PHP encoding plus optional encryption of non-PHP files. Pro and Cerberus also include the optional PHP licensing features for time expiry and restricting where code can be used, allowing licensing models to be effectively and easily implemented.

The PHP Encoder is available for Windows, Linux, FreeBSD and Intel OS X. All versions offer command line access for encoding and creating license files (Pro and Cerberus), which is ideal if you wish to automate processing. The Windows Encoder also includes an easy to use GUI, and the Windows Pro and Cerberus version includes a Linux based license generator for PHP scripts for FREE, which is great if you wish to encode on Windows and create license files from a Linux based web server for example.

Encoded files run on a wide range of operating systems such as Linux, Windows, FreeBSD and more.

Encoding BenefitsAs PHP scripts can be easily read, changed and run on any PHP enabled system, encoding PHP offers important benefits:

Product Developers: protect and license your code before distribution. Ideal for protecting evaluation copies, the low once only purchase cost can quickly deliver a significant return on investment from increased sales.

Website Designers: protect your creative work and a revenue stream from future script updates.

Enterprise Customers: successfully enforce internal change control policies by avoiding untracked software tweaks that may get lost on a site reinstall or server move.

Website Owners: hide sensitive data and protect scripts from unauthorised changes that may go unnoticed indefinitely and be a serious security and data protection risk.

Example of code

Here is a section of code from an index.php file

=========================================================================================================

START OF PHP CODE

=========================================================================================================

<?php
session_start();
include(“./includes/Functions.inc”);
include($_SERVER["DOCUMENT_ROOT"].”/includes/Variables.inc”);
?>

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head><title><?php print GetTitleTag(“1″); ?></title>

<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<meta name=”description” content=”<?php print GetMetaDescription(“1″); ?>”>
<meta name=”keywords” content=”<?php print GetMetaKeywords(“1″); ?>”>

=========================================================================================================

END OF PHP CODE

=========================================================================================================

and here is the encoded code segment

=========================================================================================================

START OF PHP CODE

=========================================================================================================

<?php //003ac
if(!extension_loaded(‘ionCube Loader’)){$__oc=strtolower(substr(php_uname(),0,3));$__ln=’ioncube_loader_’.$__oc.’_’.substr(phpversion(),0,3).(($__oc==’win’)?’.dll’:’.so’);@dl($__ln);if(function_exists(‘_il_exec’)){return _il_exec();}$__ln=’/ioncube/’.$__ln;$__oid=$__id=realpath(ini_get(‘extension_dir’));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==’:'){$__id=str_replace(‘\\’,'/’,substr($__id,2));$__here=str_replace(‘\\’,'/’,substr($__here,2));}$__rd=str_repeat(‘/..’,substr_count($__id,’/')).$__here.’/';$__i=strlen($__rd);while($__i–){if($__rd[$__i]==’/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}@dl($__ln);}else{die(‘The file ‘.__FILE__.” is corrupted.\n”);}if(function_exists(‘_il_exec’)){return _il_exec();}echo(‘Site error: the file <b>’.__FILE__.’</b> requires the ionCube PHP Loader ‘.basename($__ln).’ to be installed by the site administrator.’);exit(199);

?>
4+oV57VUu30z8za7B6zr4sV2Cx2z8oGItODXXTboXYkTpB0jT1p+6ASGIRkQT5ujcsgFVWLV7rg1
fr17JxPlCTK+aVsqbjaZgMEn+I7VPEtB4N2mXDPTMRxtZCp5QQsHrngYFGQDEcv2mGVr4+O0iXVx
jUx8lUJ9/YhNRTpQHKZcyplCkUYQs6qMfWHGR1H8v1h5BdvSVUcCuyYBn4U0fGGOLGQWil2hDXh1
pe0U8QYNPykRDyivD/p2q/2rRSZ8hZEV3yL55roojBINMMQerm61Xkua6YfGdoICapac9sd3cIFI
+vLhGT4bYhYAAvqDSCcPXl/dy+1E3CB2RIr1LFD7UCoPPdYsSMH7wwf18IjIKFE/7Xg5m47pl2U3
GxZP6lKaXoWQ3LK6JQuwigN1eobfvrH1058s+w1WhsBCTCJqmhDgeIu3TzL+odxK/MM9oyva/gEX
ruX5DNdd28ouDWVJp0JNjVytRJL4jX8M1XpXAZYmf966toDAdW/Dms1AMWM9GK5d/rE/jxlHT9om
CqMaRb/5ljDrXFdoAcTFelL7CnkH73i5hC6jTzTtlyS1UwILHao6mGRBwya5dJgOO5iXImA1pDY7
H6n6HYSZE8BPg08JgotrnIpf0atZ5hdtK7Uy6/zTD3cWlN2HJ2Fn+7mWY1N6/HXJRZl7GPv3BI8e
alaIokyeT9Qq92dhY48/vPbj5n1fuGnfSDEzh315iWLHMz7YnIs/kRpBB5A8dEYJT4BTkY5SjfzY
mb65CixXBVVE3q7dkckwYmbwphe6+nKj2WbdfiC6s44rcNF4kpaLswB3Y2dM5TKZpASHs88ID7BE

=========================================================================================================

END OF PHP CODE

=========================================================================================================

Best of all, if someone tries to change your code, even the comments sections, the code won’t run. We use it on our freeware easyCMSlite, free, east content management project

To find out more about PHP code encryption click the link. There is a demo version that you can download!

ionCube PHP  Encoder
]]>
/blog/web-development/protect-your-php-code-by-obfuscating-it/feed/ 0
Make Money From Your Blog or Website /blog/web-development/make-money-from-your-blog-or-website/ /blog/web-development/make-money-from-your-blog-or-website/#comments Wed, 23 Jun 2010 06:44:01 +0000 jsmcm /blog/?p=113 Many people wonder how they can make money from their website or blog. If you’ve ever asked the question how to make money then here is a proposal to monetize your website.

We at PHP-Web-Host.com have an affiliate program which allows you to place a link on your website to us, and, if someone purchases a web hosting package through that link, you will earn a commission. To see how much commissions you may earn, take a look at our Affiliate Program page.

How does it work?

You sign up at the link above as an affiliate. This will generate a unique affiliate id for you. You then use this link as either a plain text link in your website, or you use the code with an image which we provide.

We also write a cookie to the web surfers browser which will track any sales up to a year after they clicked through from your site. In other words, if someone clicks on a banner on your site today, but they only make a purchase next 10 months later, you will still earn a commission, EVEN though they don’t go through your link when they actually make the purchase.

Some examples of the banner links are below. You are welcome to request more colors or sizes, or just check back at the affiliate’s page as we do add new image links from time to time:

Affiliate Program Link 1

Affiliate Program Link 2

Affiliate Program Link 3

You will notice that we have a variety of banners. For instance, if you are targetting UK based traffic, you can use the versions which point to www.php-web-host.co.uk and show prices in pounds. You can also show international banners with $ and the .com domain name, as well as choose different colours and sizes.

Joining the affiliate program is absolutely free, and its instant. You sign up and are immediately able to start earning commissions.

Go ahead, Sign Up Now!

]]>
/blog/web-development/make-money-from-your-blog-or-website/feed/ 0
Your own fully editable website using WordPress /blog/web-development/your-own-fully-editable-website-using-wordpress/ /blog/web-development/your-own-fully-editable-website-using-wordpress/#comments Thu, 10 Jun 2010 19:09:28 +0000 jsmcm /blog/web-development/your-own-fully-editable-website-using-wordpress/ Do you need a website that’s good looking, quick to set up, fully editable by you, the non-technical web user, and, a site that is as cheap as our cheapest hosting package?

Try WordPress (this blog is a WordPress blog). So, in our opening paragraph we promised you it was for non technical users. Here’s how:

Register for your hosting account with us. You can see on the web hosting pages that this is very cheap if you register for the 500mb package. Once you have registered, you will receive an email with all of your hosting details, including your cpanel user name and password.

Log into cpanel and select fantastico. From the fantastico page, you can select to install a WordPress blog. This will automatically install your wordpress blog, ready for you to use. But, if you want to make it look a little nicer, log into your WordPress admin panel. Click on Appearance –> Add New Themes.

From that menu, you can select a theme of your choice. There are hundreds, if not thousands of templates to choose from. Click on the install link in your chosen theme, and that’s it!

To see what a blog with a theme looks like, take a look at http://www.getfitloseweight.info. This website was setup and “themed” within about 1 hour. The discussion boards there were also set up within about an hour, also using the fantastico installer in cpanel.

Should you wish to do something like this, but you are not sure how, please contact us using the links in the navigation menu above…

]]>
/blog/web-development/your-own-fully-editable-website-using-wordpress/feed/ 0
Using AJAX to load content dynamically without refreshing the page /blog/web-development/ajax/using-ajax-to-load-content-dynamically-without-refreshing-the-page/ /blog/web-development/ajax/using-ajax-to-load-content-dynamically-without-refreshing-the-page/#comments Thu, 06 May 2010 15:13:38 +0000 jsmcm http://www.softsmart.co.za/blog/?p=91 AJAX (wiki) is a great way of performing tasks which would usually require you to reload the web page. For instance, in an estate agent website I developed, logged in users could do a search for properties. If they found a property that they liked, they could click on the “Save to Favourites” link. This would redirect the page to another page which would save this property ID in the client’s favourites list, then redirect back to the search results page. When it reached the search results page now, this property obviously did not have a “Save to Favourites” link anymore…

Enter Ajax. By applying ajax to this page, I could have the user click the link, and save the property and remove the link without needing to reload the page. This saves bandwidth (no reloading pages), saves time (don’t have to run the search query again), and it just looks slick and professional.

Ajax basically works (in layman terms, read the wiki above for a more detailed explanation) by calling a web page from a javascript, and making the result of that page available to use in the script.

So, lets say I had a form on my page which asked the user to enter the name of a city. When they click on the submit button, it should look up the current temperature of that city and display it. Usually, we would submit the form and redirect between pages to display the result. Using ajax, the javascript can call a page that does the lookup, and it can then display the information on our page using the innerHTML property of the document….

Here is an example:

<html>
<head>

<script type=”text/javascript”>

xmlhttp = null;
count = 0;

var d = new Date();

function ClearFile(StartTimer)
{
xmlhttp = null;
if (window.XMLHttpRequest)
{
// IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{
// code for IE6, IE5
xmlhttp=new ActiveXObject(“Msxml2.XMLHTTP”);
}

RndString = d.getFullYear() + “” + d.getMonth() + “” + d.getDate() + “”  + d.getHours() + “” + d.getMinutes() + “” + d.getSeconds() + “” + count++;

xmlhttp.open(“GET”,’http://localhost:81/test/DeleteFile.php?C=’ + RndString,false);
xmlhttp.send(null);

if(StartTimer == 1)
{
setTimeout(‘DoXMLPart()’, 2000);
}

}

function DoXMLPart()
{

InnerHTMLText = “”;

setTimeout(‘DoXMLPart()’, 5000);

xmlhttp = null;
if (window.XMLHttpRequest)
{
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{
// IE6, IE5
xmlhttp=new ActiveXObject(“Microsoft.XMLHTTP”);
}

RndString = d.getFullYear() + “” + d.getMonth() + “” + d.getDate() + “”  + d.getHours() + “” + d.getMinutes() + “” + d.getSeconds() + “” + count++;

xmlhttp.open(“GET”,’http://localhost:81/test/tags.txt?C=’ + RndString,false);
xmlhttp.send(null);

if(xmlhttp.responseText != “”)
{
InnerHTMLText = document.getElementById(“File”).innerHTML + xmlhttp.responseText;
document.getElementById(“File”).innerHTML = InnerHTMLText;

ClearFile(0);
}

}
</script>

</head>

<body onload=”ClearFile(1);” onunload=”ClearFile(0);”>

<div id=”File” name=”File”></div>

</body>
</html>

What this page does is the following:

When the page is loaded, the onload event in the body tag calls a function ClearFile(1). In clear file we set up our XMLHttpRequest  object and load a page called DeleteFile.php. Delete file simply opens a text file on our server called tags.txt and makes it blank.

It then sets a timer to 2 seconds (2000 milliseconds). When the time times out after 2 seconds, it will call a function called DoXMLPart().

The first thing we do in this function is set a timer to call this function again after 5 seconds. We do this because we want to continually check the server for data in this file. Obviously you could use ajax without  timers, for instance you could respond to the onclick event of a button.

Next, we set up our XMLHttpRequest object again and then call a page called tags.txt.

The property xmlhttp.responseText will contain any data from that call. In otherwords, it will contain the complete text of that file.

The line if(xmlhttp.responseText != “”) checks to see if there is anything in the file. If there is, we add it to the contents of the div called File. We then delete the contents of the file tags.txt

Using this method, we can add content to tags.txt and as we do it gets displayed to the user. Of course, we could call a php page as we did with DeleteFile.php.

A very important point is that IE 7 does not handle ajax terribly well. Internet explorer 7 (I haven’t tested the other versions)  uses some extreme caching. The  first time the ajax script is called it works fine, but thereafter it just keeps calling the ajax script that you called first. So, in our timed script above it would usually just repeat the first action over and over. It does not display new content, and even if the file is made blank, it keeps displaying what was in the file the first time. Its a real nuisance.

There is a work around though. We do two things.

1) You will notice that I have made the variable that holds the ajax xml request (xmlhttp = null;) a global variable.

2) By passing a unique query to the page you are querying, IE7 does not use the cached version.

That is the reason for this line of code:

RndString = d.getFullYear() + “” + d.getMonth() + “” + d.getDate() + “”  + d.getHours() + “” + d.getMinutes() + “” + d.getSeconds() + “” + count++;

We create a random  string which is made up of the current date and time, and an extra portion which is count. Count is a numeric value that starts at 0 and is incremented each time it is used. Note that it is not good enough to just use the count portion without the date and time portion. If the user presses refresh, the count starts at 0, but there are already cached versions of 0, 1, 2, etc, so the user will start to see actions which occured in the past repeating themselves… very confusing.

We then use this random string in our request:

xmlhttp.open(“GET”,’http://localhost:81/test/DeleteFile.php?C=’ + RndString,false);

This solves the problem with ajax (XMLHttpRequest) and IE7 perfectly. This problem does not occur in firefox.

If you have any comments or questions about this topic, please feel free to ask….

Click here to download the demo code

]]>
/blog/web-development/ajax/using-ajax-to-load-content-dynamically-without-refreshing-the-page/feed/ 0
Bypassing DVD Region Encoding /blog/general/bypassing-dvd-region-encoding/ /blog/general/bypassing-dvd-region-encoding/#comments Mon, 26 Apr 2010 06:55:03 +0000 jsmcm http://www.softsmart.co.za/blog/?p=88 I have a growing DVD collection, and this consists mostly of series, or related movies, eg, I have most of “The Sopranos”, “Friends”, “Godfather” and other related mobster films.

So, because my DVD’s are mostly series or related, I prefer to burn the original disc to my laptop. That way I can watch it where ever, when ever.

Here is what I do:

1) I burn the DVD to an iso image on my hard drive using DVD Shrink. DVD Shrink is an open source package that rips DVD’s to iso images and supposedly shrinks them too. I say supposedly because the resultant file is still just under 5Gb. In any case, it does a brilliant job of this!

2) I use VideoLan to watch the iso image as if it were a DVD in the drive. VideoLan is maybe one of the best media players I have ever come across. Its simply brilliant. It is also free, open source. This will play movies and mp3′s equally well.

Ok, so that’s all simple enough, but I ran into a problem the other day. A while back I bought the BBC’s Planet Earth series, but I bought it from the USA, so the region encoding on my DVD player is different to the regional encoding on these discs. DVD Shrink was unable to read the disc because of the DVD Region Encoding. VideoLan on the other hand had no problem playing the disc, they seem to automatically bypass the DVD region encoding. This was pretty cool and I was really impressed once again with VLan, but not surprised.

The problem here is that I don’t want to carry my disc’s with me every where I go. Besides being bulky, they’re also expensive. I read about the regional encoding schemes and I was led to believe that there was probably not a great deal I could do. BUT, this did not deter me and I let logic prevail. Logic dictated that the encoding (or rather the result of the encoding) was not purely at the hardware level. There had to be a software level involved, because if it was purely a hardware issue, then not even Vlan would have worked.

After searching around for some time (and even trying to check the registry for the DVD Region Encoding), I came upon DVD Decrypter.  DVD Decrypter allowed me to bypass the region encoding of the DVD’s and rip them to my hard drive as an iso image.

Now, I am able to once again use VideoLAN to watch my DVD’s straight off my laptop.

Next, I will test what happens when I burn those iso images to DVD. Will it have the same encoding as the original disc, or will it be encoding free? Don’t know yet, but watch this space

]]>
/blog/general/bypassing-dvd-region-encoding/feed/ 0
Compiling a C++ dll with MinGW to use with Visual Basic /blog/software/software_development/c/compiling-a-c-dll-with-mingw-to-use-with-visual-basic/ /blog/software/software_development/c/compiling-a-c-dll-with-mingw-to-use-with-visual-basic/#comments Tue, 16 Feb 2010 16:30:44 +0000 jsmcm http://www.softsmart.co.za/blog/?p=85 Using a dll compiled with C++ in visual basic is really rather easy, its just a little hard to find good (EASY) information of how to do it. There is a fair amount of information for Microsoft’s C++ compilers, but what about us who write in a text editor and compile with g++ on MinGW? This post will show you how you can be using a c++ dll in visual basic.

I’m a big fan of ANSI C++, MinGW and the g++ compiler. I don’t like MS C++ compilers for various reasons. One of those is that I don’t believe it generates ANSI compliant code, and I certainly can’t compile for Linux from it.

If you are a visual basic (VB) coder, it may be necessary at times to use a dll compiled in C++. Or, you may be in a similar situation to myself: all of your projects are written in VB and you are porting everything over to C++. However, you have a problem. Porting everything at once will take a long time. If you port a module to C++, you would want to start using that module straight away with your existing VB projects (until you have ported the whole lot).

So, here is a quick guide on accomplishing that. This guide is very simple and is intended to get you started in the right direction.

Create a cpp file called “test.cpp”. In this file, paste the following code:

// Start of file

extern “C” // only required if using g++
{

__declspec (dllexport) int __stdcall FooBar (void)
{
return 343;
}

__declspec (dllexport) int __stdcall TimesTwo (int val)
{
return val * 2;
}

}

// end of file

Now we need to compile our dll. There are two steps (maybe they can be converted into a single step, but as I said, this is a beginners guide and I’m not an expert (yet) on the g++ compiler).

To compile, in MinGW, cd to the directory that has your cpp file and type:

g++ -c -Dtest_dll test.cpp

This will create a file called test.o

Now type

g++ -shared -o test.dll test.o -Wl,–add-stdcall-alias

This will create test.dll

Now, open a normal VB  project and in the form’s code space, paste the following

Option Explicit

Private Declare Function FooBar Lib “C:\msys\1.0\home\John\Dll_with_VB_test\test.dll” () As Integer
Private Declare Function TimesTwo Lib “C:\msys\1.0\home\John\Dll_with_VB_test\test.dll” (ByVal val As Integer) As Integer

Private Sub Form_Load()

Debug.Print FooBar

Debug.Print TimesTwo(5)

End Sub

Take note of two things here:

1) The path to the dll must obviously be changed to be correct on your system

2) In the second declare, we pass an integer called val in to the dll. If you leave out the ByVal, the value is corrupted, so the ByVal bit is important.

That’s it, please post back here if you have any useful insights. Lets learn (and port our software) together!

]]>
/blog/software/software_development/c/compiling-a-c-dll-with-mingw-to-use-with-visual-basic/feed/ 0
Using Alt Tags in Images /blog/web-development/seo/using-alt-tags-in-images/ /blog/web-development/seo/using-alt-tags-in-images/#comments Tue, 02 Feb 2010 15:41:33 +0000 jsmcm http://www.softsmart.co.za/blog/?p=78 This is a quick note about alt tags.

Please see this article for more info: Can google see your website?

The reason I’m writing this again is because of its importance, but more importantly because of how many people do not do this.

Imagine you’re sitting in a movie theather, 60 / 70 years ago. Movies have not yet advanced to a stage where there is sound, so its a silent movie. Not very nice hey? And to make matters worse, you’ve brought your blind friend with you.

So, what has this got to do with the search engines. Well, you need to think of your website as an old fashioned movie with no sound. And you need to think of Google as your blind friend. He can’t see anything, and, as there is no sound in the movie, he can’t hear anything. Besides the pop corn, its really a waste. He needs to read braille.

Images on your website are like that silent movie. Google, being blind, needs the braille of the web, that is, it needs plain text! If you have a website with loads of images that look really great to visitors, remember, your blind friend google can’t read them (or the other search engines).

So, what should you do? Provide Alt text in images.

Here is an INCORRECT image tag <img src=”someimage.jpg”>.

Here is a CORRECT image tag <img src=”someimage.jpg” alt=”Yay, google can read this!”>

Ok, so, a demonstration is in order. Now, lets see an example, then you can rush off and try this on your own site. We are going to work with three php files:

1) image_noalt.php which has only an image as the main body. This image has NO alt text. So, this page is very bad and google can’t index it correctly. What about the meta keywords tags? Look here, google DOES NOT USE THEM, or look here! Matt Cutts is a chief engineer from Google. If I have his title incorrect, please forgive me, I don’t work there, I don’t know who gets called what, I just know that he’s a pretty important person there!

2) image_alt.php. This page has the same image, but it DOES have alt text, so google can “read” what your image is about, and can thus index it.

3) split.php. Here we have split this image. We have kept the heading as an image because we wanted the cool shadow effect (which you can probably do with some clever CSS anyway). The header image has alt text. Then, for the two smaller images, we’ve made their titles plain text, so google can index that. We’ve also added alt text to both the smaller images, so google has 5 pieces of information here.

To see what google more or less sees with these files, we’ll do a little comparison.

Below we have three examples. One is a page with NO ALT tags, and the entire page is just an image. There is a clickable link so you can see what the page looks like visually. Next to the clickable link, after the | symbol, is a link you need to copy and paste into a web browser. This will show you how google sees the page.  Do that for each of the three examples below. Note that when you copy the second link to see how google sees your page, you will notice some banners at the top. Those are advertising banners put there by that company. We are just looking at the text parts which is what google sees.

1) Normal image_noalt.php | http://www.delorie.com/web/lynxview.cgi?url=http://www.softsmart.co.za/blog/image_noalt.php

  • Note here that the image name big_image.jpg is all that is visible to google, in terms of the main body text, not good at all

2) Normal image_alt.php | http://www.delorie.com/web/lynxview.cgi?url=http://www.softsmart.co.za/blog/image_alt.php

  • Here there is alt text that is visible to google, so it is an improvement

3) Normal split.php | http://www.delorie.com/web/lynxview.cgi?url=http://www.softsmart.co.za/blog/split.php

  • Here there is alt text ON EACH images, as well as plain text that is visible to google, this is the best way of making sure that google know’s what your site is about.

Conclusion

If you use image, use alt text. Always! No exceptions! If you are able to split the image up, then do that. Use plain text where possible.

]]>
/blog/web-development/seo/using-alt-tags-in-images/feed/ 0
24 Questions to Ask Your Web Hosting Company /blog/web-hosting/24-questions-to-ask-your-web-hosting-company/ /blog/web-hosting/24-questions-to-ask-your-web-hosting-company/#comments Thu, 21 Jan 2010 19:43:51 +0000 jsmcm http://www.softsmart.co.za/blog/?p=74 Any business these days requires a website. It has become an expectation. Herewith, a list of 24 questions that you should ask your web hosting company before you purchase web hosting.

Technical Support:

Technical support must be available to you.

1. What do they provide?
- SoftSmart.co.za provides live chat (link available through all pages of our site).
- We provide telephone support (numbers on our contact page).
- We provide email support which is tracked via a support ticketing system.
- Knowledge base with FAQs.

2. When are they available?
- Telephone and live chats are available from 8H00 till 17H30, Monday to Friday, and usually beyond that.

3. Does tech support cost extra?
- There is no fee for tech support

Storage:

Ensure that you have enough space to expand in the future.

4. How much storage do they offer? (A typical Web site uses between 20-30 MB)
- LOADS. Our smallest package is 500Mb of disk space

5. Do they offer enough extra space for your business to grow into? 100MB is a good starting point.
- Sure. Our largest package has 10Gb disk space. If you need it, please email us to find out about dedicated hosting.

Domains:

Getting a Domain name for your business is one of the most important things you could do.

6. Will they register your Domain name on your behalf?
- Yes, when you order your hosting package, you enter the domain name of your choice.

7. How long will it take?
- Average time is < 2 hours.

8. Is there any extra cost to you?
- Most packages include a free domain name for the first year. Thereafter domain names cost R100 (+- $15) per year.

Design:

There are 3 basic website design options. 1) Hire a web developer to design the entire website. 2) A template solution that is inexpensive, but designs are not unique.

9. Do they have a builder that you can manage easily?
- Yes, we have Site builder (link to demo here).
- We have thousands of FREE web templates within our CPanel area.
- We have a great online tutorial for web authoring (link here).

10. What type of computer background do you need to design your site?

- Dependant on what option you prefer above.

11. Do you have control over content and updates?
- Yes, your site is loaded via FTP, so you control every step.

Email:

12. How many email aliases comes with your package?
- This differs with the packages, from 5 to unlimited.

13. Will your emails have the domain name in them for a more professional appearance (eg, [email protected])?
- Is there any other way???

14. What is the cost to add extra emails?
- You can easily add up to your package maximum in CPanel at no cost

15. Are there any additional costs?
- No!

Cost:

Make sure there are no hidden costs.

16. What are the initial setup fees and what do you get exactly?
- We charge no setup fees.

17. Are there any additional charges?
- Not really… If you go over your data allowance (which is huge, 5Gb on the smallest package) for 3 consecutive months, we will require you to upgrade your account.

Contract:

18. Am I locked into a contract?
- No, you pay per month.

19. May I cancel at anytime?
- Yes you can! (to paraphrase president Obama).

20. Are there any penalty fees for switching or closing my account?
- Only that you loose out on great service.

21. What happens to my content?
- Your content is yours. You can simply get it all via FTP (or as a backup from CPanel) before cancelling. Your      domain will also be transferred (note that some registrars charge about $10 to transfer domains, so you may need to pay that to them directly).

Value:

22. What makes them better than their competition?
- We provide great support. We use our own servers for our own websites and we have all the value added services, like web development, custom software development, graphic designers, etc. Because we are software / web developers we can answer technical question which extend beyond just hosting support

23. What exactly sets them apart?

- We believe the old adage that the “customer is king”, give us a try. Mail us and ask about your first 3 months ABSOLUTELY FREE!!!

24. Does the web host provide the features that you need for your web site?
- We have many free scripts like ecommerce applications, WordPress, etc for free and easy to setup in CPanel.

]]>
/blog/web-hosting/24-questions-to-ask-your-web-hosting-company/feed/ 0