Твиттер получает последний твит с помощью API твиттера в PHP

Как я могу получить только текст из твиттера statuses/user_timeline и сопоставить его с регулярным выражением php, которое возвращает true или false?

например, я получаю с этим

Array (
    [0] => stdClass Object
        (
            [place] => 
            [truncated] => 
            [user] => stdClass Object
                (
                    [default_profile_image] => 
                    [statuses_count] => 1944
                    [profile_background_tile] => 1
                    [protected] => 
                    [contributors_enabled] => 
                    [url] => http://www.mediawebsiteplus.com
                    [name] => Media Website Plus
                    [id_str] => 185200584
                    [is_translator] => 
                    [profile_link_color] => D02B55
                    [follow_request_sent] => 
                    [utc_offset] => 
                    [created_at] => Tue Aug 31 13:04:35 +0000 2010
                    [friends_count] => 1699
                    [profile_sidebar_border_color] => 829D5E
                    [following] => 1
                    [time_zone] => 
                    [profile_image_url] => http://a3.twimg.com/profile_images/1426659184/mwp_logo_normal.png
                    [description] => Media Website Plus adalah jasa pembuatan web, jasa pembuatan website, blog, web sekolah, toko online, dan aneka software murah dan berkualitas tinggi.
                    [profile_use_background_image] => 1
                    [favourites_count] => 0
                    [verified] => 
                    [profile_background_color] => 352726
                    [screen_name] => jasabuatwebsite
                    [listed_count] => 0
                    [profile_background_image_url] => http://a3.twimg.com/profile_background_images/283557264/mwp_logo.png
                    [id] => 185200584
                    [show_all_inline_media] => 
                    [geo_enabled] => 
                    [default_profile] => 
                    [notifications] => 
                    [profile_background_image_url_https] => https://si0.twimg.com/profile_background_images/283557264/mwp_logo.png
                    [profile_text_color] => 3E4415
                    [lang] => en
                    [profile_sidebar_fill_color] => 99CC33
                    [followers_count] => 210
                    [profile_image_url_https] => https://si0.twimg.com/profile_images/1426659184/mwp_logo_normal.png
                    [location] => indonesia
                )

            [id_str] => 91808775270432768
            [in_reply_to_status_id] => 
            [text] => Govt Will Not Increase Subsidized Fuel Prices: “In the remaining time of the year there may be an option to rais... http://bit.ly/qJqn9H
            [created_at] => Fri Jul 15 09:58:12 +0000 2011
            [geo] => 
            [favorited] => 
            [in_reply_to_status_id_str] => 
            [coordinates] => 
            [id] => 9.18087752704E+16
            [in_reply_to_screen_name] => 
            [source] => <a href="http://twitterfeed.com" rel="nofollow">twitterfeed</a>
            [in_reply_to_user_id_str] => 
            [in_reply_to_user_id] => 
            [contributors] => 
            [retweeted] => 
            [retweet_count] => 0
        )

)


person Yuda Prawira    schedule 15.07.2011    source источник
comment
Если вы решили свой собственный вопрос, опубликуйте свое решение в качестве ответа и примите его, а не редактируйте его в своем вопросе. Спасибо!   -  person Chris Frederick    schedule 03.08.2011


Ответы (1)


Я решил это:

$sep_status = $home_timeline[0]->text;
if (eregi($status, $sep_status)){
    echo "true !";
} else {
    echo "false !";
}
person Yuda Prawira    schedule 07.08.2011