" #__copyright__ = "Copyright 2005, James E. Robinson, III" #__license__ = "BSD" # Grab latest scuttle bookmarks and post to weblog # uses mtsend by Scott Yang from: # http://scott.yang.id.au/2005/05/update-mtsendpy-10-has-been-released/ # Configuration: # scuttle userid to get new links for: $username = "jerobins"; # minimum number of new links before a weblog post is created: $minreq = 3; # mtsend posting format - # [header1]: [value1] # [header2]: [value2] # [header3]: [value3] # ----- # BODY: # .... # valid headers - # TITLE: # ALLOW COMMENTS: 0/1 # ALLOW PINGS: 0/1 # CATEGORY: # CONVERT BREAKS: 0/1/customised text filter name $date = date("Y-m-d"); $header = "TITLE: links for $date\n" . "ALLOW COMMENTS: 0\n" . "ALLOW PINGS: 0\n" . "CATEGORY: Links\n" . "CONVERT BREAKS: 1\n" . "-----\n"; # End Configuration require_once('header.inc.php'); $statfile = "/home/jerobins/var/marks/lastupdated"; $curtime = time(); $daily = 24*60*60; if ( ! file_exists($statfile) ) { # set initial last-updated date to yesterday $yesterday = $curtime - $daily; touch($statfile, $yesterday); } $lastmodified = filemtime($statfile); $cnt = 0; $body = "BODY:\n" . '