MT PHP API?
July 19, 2006 3:36 PM
Subscribe
Movable Type PHP library: is it possible to use the PHP library in the same fashion as the perl library?
Maybe I am not making sense. MT comes w/ the perl library, e.g. MT.pm, Entry.pm, etc.
I've taken lately to writing shell scripts and cron jobs in PHP, but I have one perl script (and another coming) that must be in perl cos they use the MT library to write an automated entry, e.g.:
$entry = MT::Entry->new;
...
$entry->save;
$mt->rebuild_entry(Entry => $entry, BuildDependencies => true) or die $mt->errstr;
So but lately MT comes with an extensive PHP library (mt directory/php/lib). But it seems like this isn't really a library/API, but rather some basic functions. Is it possible to duplicate the above functionality using MT's php lib?
posted by xmutex to technology (4 comments total)
For something like this, you'd probably want to use webservices. Thats the usual way to programmatically create/edit/read posts from a blog. I'm sure that MT supports the metaweblog API, so probably the best way to do is to get a PHP metaweblog library and have that talk to MT.
MT & metaweblog - http://www.movabletype.org/siteuk/docs/mtmanual_programmatic.html
metaweblog library in php
These links were from very quick google searches - you may find better resources/libraries if you look harder.
posted by rsanheim at 6:29 AM on July 20, 2006