Featured Posts

Earn Residual Income Residual income is a passive or recurring income that continues to generate after the initial effort. Most people earn "linear" income or receive a "one-shot" compensation. Royalties, rent from properties,...

Read more

Job Opportunity Looking for work? Want to earn a few extra bucks? Start full-time or part-time. Be your own boss. Have the flexibility and the freedom. It's a business opportunity where you supply consumers with services...

Read more

Get Paid While Using Your Phone Imagine getting paid each time you or someone else makes a phone call, watches tv, surfs the internet, or uses gas and electricity. Imagine getting paid every month, every year, or over an entire lifetime....

Read more

  • Prev
  • Next

Retrieve The Latest Twitter Trends

Category : General, HTML, Internet, PHP

Here’s a simple and short tutorial on how to retrieve Twitter trends. We will be using PHP and Twitter’s API to retrieve the latest trends. You can publish the trends on your website, blog or any application you are working on. So, let’s get started.

Twitter has made trends available to anyone via API calls. The url of the API is: http://search.twitter.com/trends.json. Trends is also available in XML, but we will use JSON in this example.

To retrieve the string of data, we will use a PHP command called file_get_contents. We will suppress errors by placing an @ sign in front of file_get_contents. We will assign the string to a variable called $contents. So this is what we have so far.

$contents = @file_get_contents("http://search.twitter.com/trends.json");

Next, we will check if we have the correct response from the http_header. We will check for the code “200″, meaning we have a valid response. We will use the PHP command called strpos to find the needle in the haystack. The needle in this case is “200.” We will look for it starting at position “0.” The format is going to be like this.

$contents = @file_get_contents("http://search.twitter.com/trends.json");
if (strpos($http_response_header[0], "200")) {
  echo "ok";
} else {
  echo "fail"
}

Ok, so we now have a JSON string assigned to the variable named $contents. We just need to decode it using the PHP command called “json_decode” and assign it to the $json array variable. Next, we will run a foreach contruct to echo each trend name.

$contents = @file_get_contents("http://search.twitter.com/trends.json");
if (strpos($http_response_header[0], "200")) {
  $json = json_decode($contents);
  foreach ($json->trends as $trend) {
        echo $trend->name;
      }
} else {
}

So, there you have it. We now have the latest Twitter trends using PHP and Twitter’s API.

Post to Twitter Post to Plurk Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Ping.fm Post to Reddit Post to StumbleUpon

It’s Official No More Gimp in Ubuntu

12

Category : General, Linux

The latest decision by the Ubuntu development team to exclude Gimp in future releases of Ubuntu was a bit of a head scratcher. I wondered why Gimp had to be taken out of future releases of Ubuntu.

Gimp is a powerful program for editing graphics that we all love. It offers everyone an alternative tool to Adobe’s Photoshop. It’s rich in features and capabilities. Although it not quite up to par with Photoshop, it certainly can hold its own.

Ubuntu developers explained the reasoning behind the removal. They said Gimp was too complicated, too intimidating to casual users. Too complicated? And Linux is not? Gimp developers seem to agree about leaving it out.

So, with no Gimp in Ubuntu’s future, users are encouraged to use F-Spot, a mono application I might add. And that may not even stick. Developers are already talking about replacing F-Spot with Shotwell or Gthumb.

The good news is it’s easy to install Gimp. It will probably be the first application I will install after installing Ubuntu. That’s if I’m still using Ubuntu.

Post to Twitter Post to Plurk Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Ping.fm Post to Reddit Post to StumbleUpon

Increase PHP File Upload Limit

Category : General, Linux, PHP

If you have installed a LAMP server either on your Linux desktop or server, you are bound to run into this problem. The default PHP installation placed a 2MB limit on file uploads. I ran into this problem when I tried to import a XML file that was bigger than 2MB into a WordPress install. So, to increase the upload limit, I edited the PHP configuration file called PHP.INI.

In Ubuntu, the default location for PHP.INI is in the /etc/php5/apache2 directory. So, let’s open up the Terminal and edit the PHP.INI file:

$ sudo vi /etc/php5/apache2/php.ini

Look for this entry in the file.

upload_max_filesize = 2M

Increase the limit to 10MB or to any value you prefer.

upload_max_filesize = 10M

Save file and exit.

Next, you will need to restart the Apache server for your changes to take effect. From the Terminal type this command to restart your Apache web server:

$ sudo /etc/init.d/apache2 restart

That’s it. Have fun uploading large files!

Post to Twitter Post to Plurk Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Ping.fm Post to Reddit Post to StumbleUpon

Black Friday 2009 Sales

Category : General, Internet

Are you looking for a great deal on Black Friday? Well, you’ve come to the right place. About two and a half years ago, I made a post about Frys Electronics running their own ads in the San Jose Mercury News. I just checked the link. The good news is the link still works. By the way, Frys publishes new ads everyday. So, I recommend that you check this link again on Thanksgiving Day.

In addition, I found a couple of websites that publishes Black Friday sales: check out this one and this one. Good luck with your hunt this Friday. I hope you find what you are looking for!

Post to Twitter Post to Plurk Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Ping.fm Post to Reddit Post to StumbleUpon

Upgrade Your Theme To Support WordPress 2.9

2

Category : General, Internet, Linux, PHP, WordPress

WordPress 2.9 is just around the corner. It will be here before we know it. There are a number of new features in WordPress 2.9. The inclusion of “post thumbnails” is first and foremost. It allow bloggers to upload thumbnail images associated with their posts.

Theme designers and users have several choices as to what thumbnail image size to display, whether the default thumbnail size, medium, large or full, the original size uploaded.

Another feature that has made it to WordPress 2.9 is the addition of the “trash“  feature for posts, pages and comments. It’s similar to the “trash can” feature found in Windows and Linux operating systems. It allow bloggers to recover posts, pages and comments that were previously deleted.

Also included with WordPress 2.9 is the addition of the basic image editing features in the Media Library. Users will be able to rotate, crop, flip and scale an image.

This particular post focuses on what you need to do to get your theme supported in WordPress 2.9. I will show you how to make changes in your current theme to support the thumbnail images.

To activate thumbnail support, you need to add this line of code to functions.php.

add_theme_support('post-thumbnails');

Next, you need to edit your index.php and single.php pages or any page where you want the thumbnail images to be displayed. Add this line of code.

<?php the_post_thumbnail( ‘post-thumbnail’ ); ?>

For medium size: <?php the_post_thumbnail( ‘medium’); ?>

For large size: <?php the_post_thumbnail(‘large’); ?>

For full image: <?php the_post_thumbnail(‘full’); ?>

That’s it. Get a head start. Make your theme changes now.

Post to Twitter Post to Plurk Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Ping.fm Post to Reddit Post to StumbleUpon