» tagged pages
» logout

sorted by: recent | see : popular
Content Tagged with User:alex + LiveMarks

Del.icio.us is not updating their feeds again

If you are using LiveMarks or the tag digest page, the reason it’s empty is that del.icio.us has stopped updating its RSS feeds.

This happens a lot and there’s not much I can do about it, just have to wait till they turn the feeds back on again, it’s usually not much longer than a couple days.

Here’s a traffic graph of del.icio.us

User:alex: Alex Bosworth - The Races

rohan_kini: Im Blown !!

swik/livemarks blogpost

User:alex: My Bookmarks

PHP-Presence

There are 3 components to doing a lightweight PHP presence script:

Store state of visitors

I think the easiest way to do this is in MySQL or another database you are using with your script.

Here’s a simple mysql table that can store visitor state:

CREATE TABLE `visitors` (
  `ip` int(4) unsigned NOT NULL default '0',
  `visited` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`ip`),
  KEY `visited` (`visited`)
)

note: this uses Arjen Lentz’s method of storing IPs in ints. technique.

Update state of visitors

Here’s the code:

$sql = " 
SELECT COUNT(*) as numVisitors FROM visitors 
WHERE ip = INET_ATON('".$_SERVER['REMOTE_ADDR']."')";

$result = mysql_query($sql) or die($sql.mysql_error());
$row = mysql_fetch_assoc($result);

if ($row['numVisitors'] == 0)
{
  $sql = " 
INSERT INTO visitors 
SET ip = INET_ATON('".$_SERVER['REMOTE_ADDR']."')";
}
else
{
  $sql = " 
UPDATE visitors SET visited = NOW() WHERE ip = INET_ATON('".$_SERVER['REMOTE_ADDR']."')";
}

mysql_query($sql) or die($sql.mysql_error());

Retrieve and display recent visitor count.

This one’s easy:


$sql = " 
SELECT COUNT(*) as numVisitors 
FROM visitors 
WHERE UNIX_TIMESTAMP(visited) > ".(time() - 60 * 10); //or whatever you consider recent

$result = mysql_query($sql) or die($sql.mysql_error());
$visitors = mysql_fetch_assoc($result);

echo $visitors['numVisitors'];

This script is used in LiveMarks to show the number of visitors currently on the page.

Zoka

Zoka is a project by Alex Bosworth to show streaming channels of information.

Please edit this page and report bugs!

Known bugs:
  • Safari is kind of horked (due to a bug in safari’s javascript engine :( )
  • IE – I haven’t tested it at all yet, probably will have css and Javascript issues
  • Same entry is sometimes shown more than once
  • Firefox 1.07 has a flicker issue

Feature Requests: Vote for features or propose new ones here.

Apply to password protect your channel, please send me email.

Project Hiatus

Zoka as a project is currently on hiatus from active development, as now that I’ve written it, I feel like I have to rewrite it from scratch to deal with issues that came up, such as server load problems, interactivity lag, browser cross compatibility and browser lag.

The rewrite, if I get to it, will focus on improving speed on the client and server, making the channels interface more natural and betterer, and allowing arbitrary data feeds (any rss feed).

GPL

Any code you can see, HTML, CSS etc is licensed under the GPL. Server side code is still too prototypey and disorganized to publish and isn’t available yet :/

Credits

External Links

LiveMarks

LiveMarks is a project to show del.icio.us and other services’ bookmarks live.

On the left of LiveMarks you can see most recently popular bookmarks. On the right, bookmarks scroll by as people bookmark them.

Clicking on .oO links launches them in a new browser window.

Links