예제 #1
0
        $tocompany = $companyname . " is Top Pick at StockChase http://www.stockchase.com/opinions/recent #stockaction \$" . $symbol;
        echo '<br>
' . $tocompany . '
';
        if ($debug) {
            echo "<br>{$an} Would send to twitter <b>{$tocompany}</b>";
        } else {
            try {
                $twitter = new Twitter($config['consumer_key'], $config['consumer_secret'], $config['access_token'], $config['access_token_secret']);
                $twitter->send($tocompany);
            } catch (Exception $e) {
                echo 'Caught Exception: ', $e->getMessage(), '\\n';
                //	mail('*****@*****.**','stockchase twitter error company');
                //die('here');
            }
            //echo shell_exec('/home/stockchase/EditorFunctions/python/mytweet.py "', $tocompany. '"');
            flush();
            sleep(10);
        }
    }
}
set_time_limit(10);
$dow = GetDOW();
$debug = false;
global $session;
if (isset($_REQUEST['debug']) && $_REQUEST['debug'] == 1) {
    $debug = true;
}
echo '<html><body>';
SendTopPickTwits($debug);
echo '<br>Done Top Pick Twitters';
예제 #2
0
                echo $ex->getMessage();
            }
        }
        //$result = mysql_query($q);
        //	mysql_query($u);
        //	echo(mysql_error());
    }
}
set_time_limit(0);
echo '<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /></head>';
$dow = GetDOW();
$debug = false;
global $userid;
//$userid = 0;// only used if debug is on
if (isset($_REQUEST['debug']) && $_REQUEST['debug'] == 1) {
    $debug = true;
    //$userid = $session->userNumber;
    $dow = GetDOW(-1);
    if (isset($_REQUEST['userid'])) {
        $userid = $_REQUEST['userid'];
    }
    echo "userid is " . $userid . "and debug is true";
}
echo '<html><body>';
EmailMyStocks($dow, $debug, $userid);
echo '<br>Done Portfolio Emails';
EmailTopPicks($dow, $debug, $userid);
//	echo '<br>Done Top Pick Emails';
//	SendTopPickTwits($debug);
//	echo '<br>Done Top Pick Twitters';