Read Gmail attachments with IMAP and PHP.

Read Gmail attachments with IMAP and PHP.

Recently I came up with the idea that I could use a Gmail account as a place holder to store pictures sent from my cell phone. The idea was that I could take a picture with my cell phone and it would instantly show up some where, such as a website or blog. The following [...]

Forwarding a PHP website from one domain to another.

Forwarding a PHP website from one domain to another.

If you are planning on moving a website from one domain name to another you’ll probably want to forward all your traffic from your old site. Many people just forward the actual domain name to point to the new domain name but this won’t help people who land on specific pages. If your links stay [...]

Show thumbnails from a directory on your web server.

Show thumbnails from a directory on your web server.

The following PHP code will display a set of jpeg files from a folder on your webserver. This code can be used to generate a list of thumbnails provided that the thumbnails are already resized. This code simply outputs the images “img” html tag with the “src” already in place. I would recommend putting this [...]

Limit RSS to certain categories in Wordpress.

Limit RSS to certain categories in Wordpress.

If you’re like me, you may once in a while have something to write about that isn’t necessarily related to your overall blog topic. Take me for example. My blog is mainly about internet and application development (programming) however sometimes I find a really cool tip or trick that isn’t necessarily related, such as a [...]

Debug PHP code with the PHP debug tools.

PHP debug tools provides various debug tools, including: script trace debugging (using the xdebug extension), error debugging, manual debugging using a debug() function that generates a backtrace and other useful information, and debugging database queries.

Create OpenDocument spreadsheets in PHP.

The odsPhpGenerator has been released. The generator is a small and easy library written in PHP 5.0 to make the creation of Open Document Spreadsheets easy. This first version requires PHp5.0. Below is a simple example of how you would use this library.

// Load library

require_once(‘ods/ods.php’);

 

// Create Ods object

$ods = new ods();

$ods->setPath2OdsFiles(‘ods’);

 

// [...]

Uploading files to a web server using Visual Basic.

Do you need to upload a file to your php web server from a .NET application? I did, and I found that it was actually pretty easy. Basically the upload.php file works the same way as a basic HTML website form. You simply do an HTML form post from within your .NET application.
[...]

How to search yahoo images with PHP.

The following code is a basic example of how to use the Yahoo search API. An array of objects is returned containing the search results letting you create dynamic scripts to show images. This code could be used to make a simple plug-in for Wordpress to show images based on tags in your posts or [...]

How to get Google page ranks with PHP.

This snippet of PHP code will show you how to get a Google page rank for a specific website. The function below will return the page rank as an integer. The code was pulled from the wordpress links directory plugin located here.

How backup and email MySQL databases with Cron and PHP.

Here is a PHP script I wrote to backup my mySQL databases. Just use a cron job to run the PHP script when you want. The PHP MySQL database backup script will also email the database. With a Google Gmail account you get more than 7 gigs of storage so they are a good service [...]

Making a simple ListBox with GTK and Glade3.

Adding a simple ListBox widget in your GTK application is easier than you think. This tutorial will show you how to create ListBox-like functionality in GTK using Glade3. GTK uses the TreeView control as their do-all list control. You can create simple lists, tree-like lists and all sorts of various list views. What is really [...]

Read More »

Glade 3 + GtkBuilder + Anjuta Example.

Today I whipped up a simple GTK application using the Anjuta IDE, Glade 3, and the new GtkBuilder system. As some of you know, Glade 3 and GTK changed things up. First Glade stopped using generated code which required you to use libglade. Now the GTK developers created their own interface interpretor called GtkBuilder. [...]

Read More »

Get Windows Service info in C#.

This code will show you how to search for Windows Services. The ServiceController class handles almost everything service related. You can also check if services are running by checking the service.Status property and you can search for installed services using the sample code below. The services we are talking about are the services that run [...]

Read More »

Visual Basic comes to Linux.

Visual Basic for Linux is here, sort of. In my search for the perfect RAD environment for Linux I came across a project called Gambas. Gambas is a Visual Basic like development environment for Linux which is very much like Microsoft’s drag and drop Visual Basic but it is not a clone. For an Open [...]

Read More »

Add background color to PNG files in C#.

This code snippet will let you force a background color into a PNG file with C#. When working with PNG files in Visual Studio sometimes you’ll run into situations where the background of a PNG shows up as grey or even blue. This is because of the PNG files transparency and Windows can sometimes [...]

Read More »

C#: A multi-threaded UDP server with BackgroundWorker.

The following code shows you how to build a UDP server in C# using the UUdpClient class for the networking and BackgroundWorker class for reporting data back to the application. This particular UDP server class is designed to be used with a Windows Forms or GUI. When using the UDP server you pass a BackgroundWorker [...]

Read More »