$server"; print " about $url...\n"; list ($resp, $status, $code) = curl_get($dest); if ($code != 200 && $status) print "$status: "; if (!$resp) { if ($code == 200) print "Done."; else print "No response!"; } print "$resp\n"; } function curl_get($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); if ($error = curl_error($ch)) return array("$error.", "", 0); $status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); $status_line = substr($response, 0, strcspn($response, "\n\r")); $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE); $body = substr($response, $header_size); curl_close($ch); return array($body, $status_line, $status_code); } if($content=$_POST['content']) { // We know what to quote better than you PHP, thank you very much: if(get_magic_quotes_gpc()) $content = stripslashes($content); print "

Publishing your message...

\n"; // date('c') isn't implemented by PHP4: $ts = date('Y-m-d\TH:i:s'). substr_replace(date('O'),':',3,0); // SCRIPT_URI isn't present on all servers, so we do this instead: $authority = "http://" . $_SERVER['HTTP_HOST']; $root = $authority . dirname(dirname($_SERVER['SCRIPT_NAME'])); $post = "$root/data/$ts"; $ex = new SIOCExporter(); $user = new SIOCUser($sioc_nick, "$root/user/$sioc_nick", 'name', 'mail', 'page', $foaf_uri, '', '', '', $foaf_url); $ex->addObject(new SIOCPost($post, $ts, $content, '', $user, $ts, '', '', '', 'sioct:MicroblogPost')); $rdf = $ex->makeRDF(); $f = fopen(dirname(__FILE__)."/../data/$ts.rdf", 'w'); fwrite($f, $rdf); fclose($f); print "\n"; } ?>

New content


$key) { echo"$server
"; } if($twitter_user && $twitter_pass) { echo "" . "Twitter as $twitter_user
"; } if($laconica) { foreach($laconica as $service => $user) { $username = $user['user']; echo "" . "$service as $twitter_user
"; } } ?>