http://twitter.com/#!/dhofstet/status/25072465570963456
GoogleÅõ·é¾¯ÌãÅÈ���}ÆðееÆ�L��ܷB
©ªÅõµÄ½ç¸ï¿½ï¿½ÔñÆÔª©©ÁÄ��½Æv��ܷB
Æ��¤í¯Å�}¿çBSËmcurryÌAvP[VàÉ»ÌR[hª èܵ½B
https://github.com/mcurry/20Couch/blob/master/app/controllers/update_controller.php
ܸAºLÅÅVo[WÔðæÁÄ«Ü·B
//get the current version
App::import('Core', 'HttpSocket');
$Http = new HttpSocket();
$latestVersion = trim($Http->get(Configure::read('20Couch.home') . '/latest'));
ºLÅæ¾ãAt@Cª³µ_E[hÅ«½©mFµÄ��ܷB
$Http = new HttpSocket();
$Setting = ClassRegistry::init('Setting');
$url = sprintf('%s/registrations/direct/%s/' . Configure::read('Update.file'), $home, $Setting->find('value', 'registration_key'));
$latest = $Http->get($url);
WJ
$msg = '(using ZipArchive)';
$zip = new ZipArchive;
$zip->open(TMP . Configure::read('Update.file'));
$result = $zip->extractTo(ROOT);