if ($acc_data == 'reload') { echo "Reload page"; } else { //echo $api->getTWDirectMessagesInBoxFromServer( $acc_data->userId, $acc_data->accountId, $acc_data->user_at, $acc_data->user_ts ); echo $api->getTWDirectMessagesInBoxFromServerNew($acc_data->userId, $acc_data->accountId, $acc_data->user_at, $acc_data->user_ts); } break; case 'getTWUserProfile': //$acc_data = $api->getAccountData ( $_POST ['i'], $_POST ['j'] ); $acc_data = $api->getAccountDataByID($_POST['accountID'], $_POST['profileID']); if ($acc_data == 'reload') { echo "Reload page"; } else { // if (Server_Side) { if (!isset($_POST['user_id'])) { $result = $api->getTWUserProfileServer($acc_data->userId, $acc_data->accountId, $acc_data->sampleId); //$result->addChild('i', $_POST ['i']); //$result->addChild('j', $_POST ['j']); $result->addChild('type', "tw"); } else { $result = $api->getTWUserProfileServer($_POST['user_id'], $acc_data->accountId, $acc_data->sampleId); } // } else { /*$connection = new TwitterOAuth ( CONSUMER_KEY, CONSUMER_SECRET, ( string ) $acc_data->user_at, ( string ) $acc_data->user_ts ); if (! isset ( $_POST ['user_id'] )) { $result = $connection->get ( 'users/show', array ( 'user_id' => ( string ) $acc_data->userId, 'include_entities' => 'false' ) ); $result->i = $_POST ['i']; $result->j = $_POST ['j'];