-
Notifications
You must be signed in to change notification settings - Fork 14
/
run.php
executable file
·45 lines (34 loc) · 979 Bytes
/
run.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* *********************************************************
*
* @author cluries
* @link http://cdbit.com
* @version 1.0
* @copyright 2012 http://cdbit.com All rights reserved
*
* *********************************************************
*/
define ( 'START_TIME', microtime ( true ) );
define ( 'BASE_PATH', dirname ( __FILE__ ) );
define ( 'DEBUG', true );
include BASE_PATH . '/config/config.inc.php';
include BASE_PATH . '/modules/init/bootstarp.php';
$twitter = new Twitter_Source ( $cfg_twitter );
$tweets = $twitter->gets ();
if (empty ( $tweets )) {
display ( "Tw2other run well but there is no tweets need to sync" );
}
$modules = array('Sina','Tencent','Renren','Douban','Fanfou');
foreach ($modules as $m) {
if (! file_exists(tmpDir(strtolower($m).'.oauth'))) {
continue;
}
$target = "{$m}_Sync";
$config = 'cfg_'.strtolower($m);
$target = new $target($$config);
$target->sets($tweets);
$target->sync();
}
display('^_^');
?>