Image bookmarking: the current situation

When it comes to marking and remembering images from around the web, you have very few options. Traditional image management and sharing sites focus mostly on photos that you have taken and wish to share with the world, but with today’s massive amount of user generated content, there is a need for services that let you manage not only what you yourself have made, but what you like that other people have made.

FFFFound and Vi.sualize.us are the two standout image bookmarking sites, and surprisingly, they work in completely different ways. Not technologically, but rather in how they facilitate sharing and discovering of new images.

Vi.sualize.us is, as you might expect, a Del.icio.us like social image bookmarking site. Users can save images using a bookmarklet or contextual menu (via a Firefox extension) to save, describe, and tag images they come across on the internet. Vi.sualize.us saves the images are saved to your profile/gallery and there are a number of sorting options for your viewing pleasure. In addition, you can browse other people’s saved images or view the most popular overall. It is in fact a Del.icio.us for images.

FFFFound is more of an artistic web project. While it also uses a bookmarklet or extension and allows you to save the images you find, that is where the similarities end. FFFFound is more like StumbleUpon than Del.icio.us in that it takes what you have bookmarked and serves you reccommendations based on those. In addition, it is invitation only at this point. It seems to have been built more as a tool to inspire photographers and artists than as an image bookmarking service.

So if you are looking for del.icio.us like functionality for your images, check out vi.sualize.us and if you are of the artistic persuasion, you might start looking for an invitation to FFFFound. I hope to see more projects popping up into this space in the near future, not just for photos, but for all types of content.

1 Comment

How to pull statistics from Icecast with PHP

Update: I’ve refactored a good deal of the code here to support radio servers with multiple mount points. It now uses the SimpleXML functions in PHP5, so make sure you’ve got those enabled.

icestats.php

check_server();
  1.     }
  2.  
  3.     function check_server() {
  4.         // check if the icecast server is even running
  5.         $this->fp = fsockopen($this->host, $this->port, &$errno, &$errstr, 10); // wait ten seconds
  6.         return is_resource($this->fp);
  7.     }
  8.  
  9.     function check_station($mount='') {
  10.         if (empty($mount)) {
  11.             return false;
  12.         }
  13.         $this->mnt = $mount;
  14.         fputs($this->fp, "GET $mount HTTP/1.0\r\nUser-Agent: PHP5/Icecast2 Checker (PHP5/scriptsamurai.com)\r\nHost: ".$this->host."\r\n\r\n");
  15.             $result = fgets($this->fp, 255);
  16.         fclose($this->fp);
  17.         return strstr($result, '200 OK');
  18.     }
  19.  
  20.     function pull_stats(){
  21.         if (!$file = fopen('http://'.$this->user.':'.$this->pass.'@'.$this->host.':'.$this->port.'/admin/stats.xml', 'r')) {
  22.             return false;
  23.         }
  24.         // $file is a valid stream
  25.         $stats = stream_get_contents($file);
  26.         fclose($file);
  27.         // load raw XML stats into a SimpleXML object and then parse out just the mount-point we ask for, or return an error.
  28.         $parsed = new SimpleXMLElement($stats); unset($stats);
  29.         $key = null;
  30.         $mount_points = $parsed->xpath('//source');
  31.         foreach ($mount_points as $mount_index => &$mount_point) {
  32.             $mount = ($parsed->source[$mount_index]->attributes()); $mount = &$mount['mount'];
  33.             if ($mount == $this->mnt) {
  34.                $key = $mount_index; break;
  35.             }
  36.         }
  37.         // return correct array for this mount point.
  38.         return $key !== null ? $parsed->source[$mount_index] : false;
  39.     }
  40. }
  41. ?>

this next script is just a demo of how to access the above - you’ll want to take a look at the print_r($stats) and see which fields you want returned for that mount point, then style them accordingly.

check_station('/daft')) {
  1.         if ($stats = $r->pull_stats()) {
  2.             echo '<pre>'; print_r($stats); echo '</pre>';
  3.         } else {
  4.             echo 'There was a problem retrieving the station information.';
  5.         }
  6.     } else {
  7.         echo 'The requested station is currently unavailable.';
  8.     }
  9. } else {
  10.     echo 'The radio server is currently unavailable.';
  11. }
  12. ?>

A final note, when accessing $stats in anything other than print_r(), use $stats->property_name, because $stats is a SimpleXML object.

3 Comments

Passenger = Passive Messenger

Communication should happen on your terms.

Focus on non time-sensitive information. Website, mobile, and desktop application. Not an instant messenger, though messages are delivered instantly whether recipient is online or not. No state of presence, meaning no online, offline, or away status.

Classic friends/buddy style list. Notification next to friend’s name of new message. Clicking friend opens up a stream of communication in two directions. To and from in chronological order. A messaging form is located at the top and includes the ability to embed images, music, videos (youtube, etc), and other types of content directly in a message.

Leave a comment