Current Projects (what are you up to?)

A

Anonymous

Guest
I thought I'd start a topic for people to talk about their current or recent projects (PHP or otherwise). Anybody doing anything interesting? Looking for feedback or just want to boast? Post it here.

------------------------------

My current project:

Currently I'm writing a PHP interface to the DAAP protocol, which is the protocol that Apple's iTunes uses to share and stream playlists

I'm not a Mac person at all, but it seemed like an interesting challenge. The DAAP protocol is built atop HTTP, so interfacing with the server is pretty simple, but making sense of the data that iTunes returns is quite a challenge. Fortunately, a number of people have already done most of the footwork for me (1, 2).

The big challenge has been learning how to deal with binary data in PHP. When you query iTunes, the response is in a binary format (no human-readable XML or anything, here). I just started working on this tonight, about six hours ago, and with the help of the protocol documentation, I've been able to write a function (recursive, no less) that takes the binary data returned by iTunes and turn it into an array in PHP. My eventual goal is to make an OOP interface to the DAAP server., and then use that to build some sort of web-based DAAP-browsing app. We'll see how far I get.

If anybody's really interested in how this project is going, send me a PM (or post below) and I'd be happy to discuss it and show you what I've got, though at this point I don't want to turn it into a team project -- I'm just tinkering now. But I have come up with a couple of functions that might be helpful for other projects.

The first should be easy, but it took me a long time to figure out. It's a function to take a binary string (not a string of 1s and 0s, but an actual string of binary data -- for the former, just use bindec()) and return its integer value:
Code:
<?php
// convert a binary string to an int
function bin2int($bin) {
	return hexdec(bin2hex($bin));
}
?>

The second has come in very handy for dealing with binary data. It prints the hexadecimal representation of a string, nicely formatted into rows ($width, default 16 bytes/row) and columns ($break, default 4 bytes/col). There's also an option ($return_text = 1) to format the plaintext representation, which is useful if you want a side-by-side view (dont forget to use <pre></pre> to preserve formatting). Certain characters in the plaintext view can foul up the layout, but other than that it's a very useful tool:
Code:
<?php
function bin_dump($string, $width = 16, $break = 4, $return_text = 0) {
	$line_count = 0;
	$section_count = 0;

	$hex = '';
	$text = '';

	for($i = 0; $i < strlen($string); $i++) {
		$line_count++;
		$section_count++;
		$hex .= str_pad(strtoupper(dechex(ord($string{$i}))), 2, '0', STR_PAD_LEFT);
		$text .= $string{$i};

		if($line_count == $width) {
			$hex .= "\n";
			$text .= "\n";
			$line_count = 0;
			$section_count = 0;
		} elseif($section_count == $break) {
			$hex .= '  ';
			$text .= ' ';
			$section_count = 0;
		} else {
			$hex .= ' ';
		}
	}

	if($return_text > 0) {
		return $text;
	} else {
		return $hex;
	}
}
?>

Here's an example of its output, from iTunes' /server-info command:
Code:
6D 73 72 76  00 00 00 A7  6D 73 74 74  00 00 00 04
00 00 00 C8  6D 70 72 6F  00 00 00 04  00 02 00 00
61 70 72 6F  00 00 00 04  00 02 00 00  6D 69 6E 6D
00 00 00 12  41 67 69 74  61 74 65 64  20 4C 75 6E
63 68 6C 61  64 79 6D 73  6C 72 00 00  00 01 00 6D
73 74 6D 00  00 00 04 00  00 07 08 6D  73 61 6C 00
00 00 01 00  6D 73 75 70  00 00 00 01  00 6D 73 70
69 00 00 00  01 00 6D 73  65 78 00 00  00 01 00 6D
73 62 72 00  00 00 01 00  6D 73 71 79  00 00 00 01
00 6D 73 69  78 00 00 00  01 00 6D 73  72 73 00 00
00 01 00 6D  73 64 63 00  00 00 04 00  00 00 01

Okay, so what's everybody else working on?
 
Sounds like an interesting 'little' project that Swirlee...

Myself, I'm not doing a great deal... have recently finished working on http://www.campusunite.com... and am just beginning to redesign (have planned only so far) http://www.nvas.net. Nothing much to tell about this right now... I'm basically rebuilding my own website, replacing my old sloppy coding with new, well commented coding that removes all the old bugs and loops. When I first built the site, I was still fairly new to PHP, so most of my work was learning 'on the job'... I learnt an awful lot to do this, including IP blocking to keep banned members out, txt file reading + writing, FTP transfers and so on...

Not quite as exciting as swirlee's :cry: but still, I find it interesting :D

Regards,
Bezmond
 
swirlee your project seems to be interesting, and I would like to you hear from you about this project :wink:
-currently I am not doing any projects but taking review of web services with php :idea:
 
Looks like someone has brewed one too many pots of coffee *looks in Swirlee's direction* :wink:

Myself, I am currently using ColdFusion since that is my employers choice, but nothing of interest there... as far as PHP goes, I am finishing off a small CMS that I put together for a local association.

Ciao :wink:
 
Well, my DAAP interface project has come to a screeching halt. As it turns out, as of iTunes 4.0.1, a new authentication header was added to the DAAP protocol (and the protocol's version number was upped to 2.0). Basically, once the client has logged in, it has to send a particular string to the server with every request, and nobody has figured out how to generate this string. It looks like an MD5 checksum or similar, probably derived from the session-id and other values unknown to everybody outside of Apple, and I sure don't have the knowledge or resources to figure it out myself.

So my project is on hiatus for now. Which is a shame, as it was going well. If I really wanted, I could make a complete interface to work with DAAP 1.0 servers (by downloading daapd, for example, an open-source project that runs on the DAAP 1.0 protocol), but I don't really want to bother unless I can make it work with current iTunes clients. Maybe if we're lucky, Apple will release a full spec of the protocol (there was some talk of this back in May, but nothing since) and I can pick it up again.

In the meantime, if anybody's interested in picking up this project or just seeing what I did, send me a PM and I'll be glad to send you my files.

Now I have to think up a new project. Anybody have any bright ideas? Something interesting, like the above, something that'll stretch my brain?
 
nothing intresting

article-blog
convertor to WBMP
Subscribe Server Software.....

site tracker system

i say nothing intresting...
 
does any one knows any interesting lib in php on which work should be done.
:(
hay pejone,swirlee how is life?
 
intresting?

last that i have setup it was php_templates, but now i use Smarty...

some other intresting libs you could find at PEAR =)....
 
at the moment I do not have much time to implement PHP-code, because I'll start to work in a softwareengineering-company for 6 months.
so java dominates my life :-D
 
Interesting project swirlee!

Well, doing nothing, just changing my website from personal to a little programming 'community', if i can call it like that.
Wanna make it all open-source, so it will take some time and things have to be done the better way!

Not sure yet... however, thing are going right!
 
now create pseudoXML class for my big project.
It's like portal system where from user need to know how work internet.
User have a constructor of pages (pages saves as XML)
may set a position and ets like a RAD.
too many components like image text input calendar and etc...
all components build in XML.

somthing like that....
that project will be protected.... I think what it will a commercial product....
but then you create it one it's hard.....
 
working on a user-defined templating system..
using smarty with it.
storing the tempaltes in the DB.
working with interface for it as well.
quite interesting...
 
To whom it may concern.... ;-)

Working on webfrontend of existing mysql db (as complete newbie)

challenging when you don't know what u r doin... (like me) :???: 8O
 
new projects

ori.com.ua - site for my friends photographers
no screens for now

few fronts for textpatern (blogs blog blogs =))
see my blog. i will finish it in wednesday

two simple mods for phpBB and one more not so simple
first few i will make in next week, other - i dont know.. later.

> sqlite db admin - frozen for now. i wanted to make it for Zend Coders Contest - but unfortunatly i dont have much time, i think i will back to it in november whan i will have enaghe free time.
screens here
http://last.samuray.com.ua/files/sqlite_1.gif
http://last.samuray.com.ua/files/sqlite_2.gif

TestDrive CMS (CMS for autosalons...) few screens
screens
http://last.samuray.com.ua/files/tesrdrive_front_1.gif
http://last.samuray.com.ua/files/tesrdrive_front_2.gif
http://last.samuray.com.ua/files/tesrdrive_admin_3.gif
http://last.samuray.com.ua/files/tesrdrive_admin_4.gif


many projects many ideas, and a dont have enaghe time =(.

my own site have few bugs , but i havent fix it, course i haven't time for uploading a new css.

time is everything.....
 
Hey swirlee, nice project, hope someone figures out that string soon so you can continue... Why are all these companies stuck on proprietary software? It really annoys me, in the world that is starting to realize that open scource is the way to go, the company that lead software developement in the past uses the old ways and misses the opportunity to use the new ones, well at lease OS X is built on Unix, thats a relief...
Looking for a good little project to do, actually been reading up on some Python, great language, but my PHP addiction is hard to resist.
Actually, I'll be setting up PHP in Gentoo today on my laptop, cant wait for that to be on there!:grin:
 
Hallo... lets see... current project...
hehe

Well it would be scandinavian food chain webshop that someone mightve heard about on this forum..
Kinda funny thou... this project doesnt really look like a webshop to me right now.. more like intranet :S

Anyways, what are YOU up to?!
 
Back
Top