Logging into iTunes through port 443?

Friday, July 25, 2008   —   Vienna 0 Comments

I've been working on a way to allow users to log into their Apple accounts on iTunes through cloudTunes. I've been Telneting the iTunes Music Store server through port 443 but I'm not sure I'm sending my request to the right place or whether I'm missing some credentials cos it doesn't respond.

  more »

Wimbomedia Sandbox

Tuesday, June 10, 2008   —   Vienna 0 Comments

This is the link to the Wimbomedia Sandbox...

http://www.petrosalema.com/wimbo

Very rough, but communicates my ideas...

  more »

Repse Energy

Sunday, May 18, 2008   —   Vienna 0 Comments

I promised to post up the work just finished for a client so here it is:

Repse Energy - Corporate Webite

  more »

flyTunes!

Friday, May 16, 2008   —   Vienna 0 Comments

It's been a while since I've written anything — anything that wasn't code that is... I've been really busy with a project for a client. I'll have a link to it up once it's cleared.

I've also been at work on something really neat this week: flyTunes. flyTunes allows you to browse albums from the iTunes Music Store on your browser.

flyTunes

  more »

Function to list directories

Friday, February 08, 2008   —   Vienna 0 Comments

I've seen lots of people asking for this, so I'm posting a recursive function that iterates through a directory and subdirectories, and lists all the files contained within.

This function takes one parameter, the directory you want to list. The function then continues looping through itself until it runs out of subdirectories and files within this directory. The function returns a string containing the files and folders contained in the directory displayed in a tree.   more »

Generate title and caption images on the fly

Monday, January 14, 2008   —   Vienna 0 Comments

This article demonstrates how to use PHP to generated title and caption images on the fly...

When a web designer wanted to display text as an image, the procedure would commonly begin with something in the vain of "open Photoshop..." But in the new web of dynamic content and massive scale, this approach won't work.

In most cases, an image text is used to display titles and headings. The example below is of the Apple's iPhone Developer Center.

Screenshot of iPhone Dev Center

  more »

Thumbnails on the fly

Thursday, January 03, 2008   —   Vienna 0 Comments

This article will show you how to create thumbnails dynamically. For example, these three images have been dynamically generated from the same source.

The above images are generated with a URL like this one: www.petrosalema.com/blog/articles/burger_thumb_100.jpg; where 100 is changeable.

The benefits of being able to dynamically generate images of varying size from a single source file are too obvious to get into. But I will mention that I'v done some research and websites like Amazon, Wikipedia, IMDb, iStockPhoto, and Flickr, where there are large numbers of images to manage, all use this approach.

Below are images of varying size dynamically generated image from Wikipedia using this URL pattern: upload.wikimedia.org/wikipedia/commons/thumb/e/e8/Hamburger_sandwich.jpg/100px- Again, to generate each image 100 is simply changes to the desired width which in this case was 200 and 300.

  more »

New search results layout

Saturday, October 20, 2007   —   Vienna 0 Comments

Made some changes on the design of the "Browsing" section. Search results brings up artist images.   more »

Converting hexadecimal color values to RGB

Sunday, October 07, 2007   —   Vienna 0 Comments

A useful function to convert a hexadecimal color value to an array of RGB values.

function Hex2RGB($c)
{
	if(!$c) { return false; }

	$c = trim($c);
	$rgb = false;

	if(eregi("^[0-9ABCDEFabcdef\#]+$", $c))
	{
		$c = str_replace('#','', $c);
		$l = strlen($c);
		if($l == 3)
		{
			for($i=0; $i<3; $i++) { $c6 .= substr($c, $i,1) . substr($c, $i,1); }
			$c = $c6;
		}
		unset($rgb);
		$rgb[0] = $rgb['r'] = $rgb['red']   = hexdec(substr($c, 0,2));
		$rgb[1] = $rgb['g'] = $rgb['green'] = hexdec(substr($c, 2,2));
		$rgb[2] = $rgb['b'] = $rgb['blue']  = hexdec(substr($c, 4,2));
	}
	else { $rgb = false; }
 
	return $rgb;
}
  more »

Deleted songs on your playlists

Thursday, September 20, 2007   —   Vienna 0 Comments

When you save a track on your playlist, and it subsequently gets deleted, it now shows you that the track is gone on your playlist menu. It doesn't remove the track from your playlist though. I figured that would be a little annoying.

An I idea I'm toying with is to have the deleted song replaced by another version of the same track if one is available.

  more »

New feature: Clippings

Sunday, September 09, 2007   —   Vienna 0 Comments

Rolling out a new feature called "clipping" today. This enables you to temporarily bookmark (clip) tracks onto a clipboard and paste them into your comments.

Anything with this clipping icon can be saved to the clipboard by clicking the icon. User profiles, playlists, and tracks can all be clipped.

Clippings can then be pasted into posts and comments by clicking the "Insert Clip" button below the comment boxes which brings a menu of all the items you have in your clipboard.

Check it out at Wimbomedia.

  more »

Finally finished work on the playlist functions

Friday, August 17, 2007   —   Vienna 0 Comments

Finally finished work on the playlist functions on Wimbomedia. You can now drag and drop to rearrange the song order, you can save it, rename it. I also fixed the bug with the play modes.   more »

Volume memory

Friday, May 25, 2007   —   Vienna 0 Comments

Wimbomedia now remembers your volume setting even when you close the browser.   more »

Human-readable file size

Tuesday, May 01, 2007   —   Vienna 0 Comments

Logarithm to change file size string like this 1234567 one to human-readable format like 123 MB.

function formatSize($s)
{
	$units = array("Bytes", "KB", "MB", "GB", "TB");

	$count = count($units);
	for($i = 0; $i < $count && $s >= 1024; $i++) { $s /= 1024; }

	return (round($s, 2) . " " . $units[$i]);
}
  more »

See what others are listening to at Wimbomedia

Thursday, March 01, 2007   —   Vienna 0 Comments

Did you notice? You can now check out what tracks your friends have been listening to... Just click the "playlist" tab on their profile and it should be the very first playlist on their list.

Wimbomedia

  more »