Affordable VPS

I have been using shared hosting services from various providers and I thought it is time to use a virtual private server (VPS). I was told that Digital Ocean is a great option. So I did try Digital Ocean, and I wasn't disappointed. They have great service, and a fast server. It is also easy to add another VPS, and it is also easy to delete if you don't need it anymore. I've been using Digital Ocean's service for months now and I highly recommend it. For more information click here.


Delete images older than one year in php

 The following code deletes images that contain the word "snapshot" and are older than one year.

<?php
$imagePattern = "/snapshot/i";
$directory = "./images";

if (($handle = opendir($directory)) != false) {
    while (($file = readdir($handle)) != false) {
        $filename = "$directory/$file";
        //echo $filename."
";
       
        if ( filemtime($filename) <=strtotime("-1 year") && preg_match($imagePattern, $filename)) {
            unlink($filename);
            //$filetime=filemtime($filename);
           
            //echo $filename."  ".date('l dS \o\f F Y h:i:s A', $filetime)."
";
        }
       
    }
    echo "Successfully deleted old images";
    closedir($handle);
}


?>

The Facebook Dislike Button is a Fake

Beware of the rapidly spreading "Activate Dislike Button" on Facebook. An article in GMA news website has a detailed explanation about the technical aspects of this link.

CHECK IF IT'S REAL OR NOT
It has few variations and it appears to have hacked a friend's account, allowing it to tag you in a post. Observe however how the post was made. You can see that successive posts are made about this but notice that it came from different media sources (pictures and names removed to keep privacy):



  • Facebook just released the dislike button! Click On 'Activate Dislike Button' below to enable it on your account!


  • Facebook just added the dislike button! Click on 'Activate Dislike Button' below to enable it on your profile!


  • Facebook just released the dislike button! Click on 'Activate Dislike Button' below to enable it on your account!


  • Facebook just launched dislike button! Click On 'Activate Dislike Button' below to enable it on your account!


  • Facebook just launched dislike button! Click on 'Activate Dislike Button' below to enable it on your account!
    about an hour ago via iPhone ·  ·  · See Friendship · Activate Dislike Button


    You can see that the posts have indicated that it came from iPhone, HTC Sense, Windows Phone, and WebOS. Other sources include BlackBerry, Android, and many more. It is quite unbelievable that your friend can do all these successively using different phones. Even if he/she does have all these phones, it will take long to be able to go from one phone to another. The posts will not appear to have been posted successively because there will be other posts from other friends in between them.

    Once again, prevention is better than cure. You already know that this is suspicious so don't bother clicking on the link. Spam can be tolerable, but what if the link is really a cross-site script? You can end up giving some confidential information.

Pacquiao vs. Mosley Live Stream

I was looking for some live stream for Pacquiao vs. Mosley because we have no cable and I can't leave the house right now for the pay per view because of a simultaneous celebration of the birthday of my nephew. I found one: