Monday, November 08, 2010 at 12:02 AM.


on getSiteData (siteUrl) {
		<<10/28/09; 9:11:35 AM by DW
	local (adrdata = wordPress.init (), adrsite = @adrdata^.sites.[siteUrl], now = ());
	if not defined (adrsite^) {
		if not metaweblog.getRsdData (siteUrl, adrsite) {
			scriptError ("Can't get site data because " + siteUrl + " isn't a WordPress site.")};
		new (tabletype, @adrsite^.stats);
		adrsite^.stats.ctAccesses = 0;
		adrsite^.stats.whenFirstAccess = now};
	adrsite^.stats.whenLastAccess = now;
	return (adrsite)};
bundle { //test code
	edit (getSiteData (""))}

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.