title: Get Tweet ID from output?
body: <p>I am posting a tweet with a picture, and I am trying to get the ID from it. I have asked it before, but for some reason it's not working anymore? Here is my code:</p>
  
  <pre><code>require 'tmhOAuth.php';
  require 'tmhUtilities.php';
  
  $tmhOAuth = new tmhOAuth(array(
      'consumer_key' =&gt; '****',
      'consumer_secret' =&gt; '****',
      'user_token' =&gt; '****',
      'user_secret' =&gt; '****',
  )); 
  
  $image = "./../images/image.png";
  
  $code = $tmhOAuth-&gt;request('POST', 'https://upload.twitter.com/1/statuses/update_with_media.json',
  array(
      'media[]'  =&gt; "@{$image}",
      'status'   =&gt; "Don't slip up" 
  ),
  true,
  true 
  );
  
  print_r($tmhOAuth);
  
  $tweet_id = $tmhOAuth-&gt;id_str;
  
  echo "&lt;br&gt;&lt;br&gt;&lt;br&gt; Try this: $tweet_id";
  </code></pre>
  
  <p>I get a whole bunch of text from the <code>print_r</code>, but <code>$tweet_id</code> is blank? I know it's in there. Here's part of the output:</p>
  
  <pre><code>"id_str":"104032165678944257"
  </code></pre>
  
  <p>Here's the full response:</p>
  
  <pre><code>tmhOAuth Object ( [params] =&gt; Array ( ) [headers] =&gt; Array ( [Authorization] =&gt; OAuth oauth_consumer_key="nY4E8qXJVxICLYTs9R2BLQ", oauth_nonce="dfac47eb37ca8897cf2542123d1638f9", oauth_signature="lHjemKp%2BJVmVgD3cQ9ady4Qb66o%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1313638299", oauth_token="129314956-PJCTyRqrhoTr5IyLGkma9CjDbss5Uohtml2qMmll", oauth_version="1.0" [Expect] =&gt; ) [auto_fixed_time] =&gt; [buffer] =&gt; [config] =&gt; Array ( [consumer_key] =&gt; nY4E8qXJVxICLYTs9R2BLQ [consumer_secret] =&gt; 64UGkGOcwqAKSLieXHOVBFgkXFJujYFkhzYTd1Yjls [user_token] =&gt; 129314956-PJCTyRqrhoTr5IyLGkma9CjDbss5Uohtml2qMmll [user_secret] =&gt; udoKo0bRmNcKY9WIHEi8cWDMldPS5PyGYEgrYWRcWPk [use_ssl] =&gt; 1 [host] =&gt; upload.twitter.com [debug] =&gt; [force_nonce] =&gt; [nonce] =&gt; dfac47eb37ca8897cf2542123d1638f9 [force_timestamp] =&gt; [timestamp] =&gt; 1313638299 [oauth_version] =&gt; 1.0 [curl_connecttimeout] =&gt; 30 [curl_timeout] =&gt; 10 [curl_ssl_verifypeer] =&gt; [curl_followlocation] =&gt; [curl_proxy] =&gt; [curl_proxyuserpwd] =&gt; [is_streaming] =&gt; [streaming_eol] =&gt; [streaming_metrics_interval] =&gt; 60 [as_header] =&gt; 1 [multipart] =&gt; 1 ) [method] =&gt; POST [url] =&gt; https://upload.twitter.com/1/statuses/update_with_media.json [request_params] =&gt; Array ( [media[]] =&gt; @./../images/appstore_icon.png [status] =&gt; Don't slip up ) [signing_params] =&gt; oauth_consumer_key=nY4E8qXJVxICLYTs9R2BLQ&amp;oauth_nonce=dfac47eb37ca8897cf2542123d1638f9&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_timestamp=1313638299&amp;oauth_token=129314956-PJCTyRqrhoTr5IyLGkma9CjDbss5Uohtml2qMmll&amp;oauth_version=1.0 [auth_params] =&gt; Array ( [oauth_consumer_key] =&gt; nY4E8qXJVxICLYTs9R2BLQ [oauth_nonce] =&gt; dfac47eb37ca8897cf2542123d1638f9 [oauth_signature] =&gt; lHjemKp%2BJVmVgD3cQ9ady4Qb66o%3D [oauth_signature_method] =&gt; HMAC-SHA1 [oauth_timestamp] =&gt; 1313638299 [oauth_token] =&gt; 129314956-PJCTyRqrhoTr5IyLGkma9CjDbss5Uohtml2qMmll [oauth_version] =&gt; 1.0 ) [base_string] =&gt; POST&amp;https%3A%2F%2Fupload.twitter.com%2F1%2Fstatuses%2Fupdate_with_media.json&amp;oauth_consumer_key%3DnY4E8qXJVxICLYTs9R2BLQ%26oauth_nonce%3Ddfac47eb37ca8897cf2542123d1638f9%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1313638299%26oauth_token%3D129314956-PJCTyRqrhoTr5IyLGkma9CjDbss5Uohtml2qMmll%26oauth_version%3D1.0 [signing_key] =&gt; 64UGkGOcwqAKSLieXHOVBFgkXFJujYFkhzYTd1Yjls&amp;udoKo0bRmNcKY9WIHEi8cWDMldPS5PyGYEgrYWRcWPk [auth_header] =&gt; OAuth oauth_consumer_key="nY4E8qXJVxICLYTs9R2BLQ", oauth_nonce="dfac47eb37ca8897cf2542123d1638f9", oauth_signature="lHjemKp%2BJVmVgD3cQ9ady4Qb66o%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1313638299", oauth_token="129314956-PJCTyRqrhoTr5IyLGkma9CjDbss5Uohtml2qMmll", oauth_version="1.0" [response] =&gt; Array ( [headers] =&gt; Array ( [date] =&gt; Thu, 18 Aug 2011 03:29:36 GMT [server] =&gt; hi [status] =&gt; 200 OK [x_transaction] =&gt; 1313638175-75577-25147 [x_mediaratelimit_remaining] =&gt; 12 [x_mediaratelimit_class] =&gt; photos [etag] =&gt; "e8f1edd9abbb4ba6c9b92464ec4e2847" [last_modified] =&gt; Thu, 18 Aug 2011 03:29:35 GMT [x_frame_options] =&gt; SAMEORIGIN [x_mediaratelimit_limit] =&gt; 30 [content_type] =&gt; application/json; charset=utf-8 [x_transaction_mask] =&gt; a6183ffa5f8ca943ff1b53b5644ef114b7a0cbbd [x_runtime] =&gt; 0.51368 [pragma] =&gt; no-cache [content_length] =&gt; 2580 [x_access_level] =&gt; read-write [x_mediaratelimit_reset] =&gt; 1313722601 [cache_control] =&gt; no-cache, no-store, must-revalidate, pre-check=0, post-check=0 [expires] =&gt; Tue, 31 Mar 1981 05:00:00 GMT [x_revision] =&gt; DEV [x_mid] =&gt; 38cf611ea13ba444edf613338dacef6a5cb496e3 [set_cookie] =&gt; _twitter_sess=BAh7CjoMY3NyZl9pZCIlOWE2YjA3NWMyZTJiZTliZjllZmI4MzkwYzQxYTdh%250AZDM6D2NyZWF0ZWRfYXRsKwgK1O%252FaMQE6B3VhIh90aGVtYXR0aGFycmlzJyBI%250AVFRQIENsaWVudDoHaWQiJTZkZDc1MjNkZjQ1NTlhZjMwODVlMzQ3M2NjNjg5%250AY2FlIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hI%250AYXNoewAGOgpAdXNlZHsA--0657ee6f8e05f42d4eb8ec769f4b445348bbee9c; domain=.twitter.com; path=/; HttpOnly [vary] =&gt; Accept-Encoding [connection] =&gt; close ) [code] =&gt; 200 [response] =&gt; {"text":"Don't slip up http:\/\/t.co\/lt5DjR6","id_str":"104032165674749952","in_reply_to_status_id":null,"favorited":false,"in_reply_to_status_id_str":null,"created_at":"Thu Aug 18 03:29:36 +0000 2011","entities":{"hashtags":[],"media":[{"type":"photo","url":"http:\/\/t.co\/lt5DjR6","media_url":"http:\/\/p.twimg.com\/AXGYtBiCEAEmcBL.png","indices":[14,33],"id_str":"104032165678944257","expanded_url":"http:\/\/twitter.com\/yourwaywebsites\/status\/104032165674749952\/photo\/1","display_url":"pic.twitter.com\/lt5DjR6","media_url_https":"https:\/\/p.twimg.com\/AXGYtBiCEAEmcBL.png","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":1018,"h":331,"resize":"fit"},"large":{"w":1018,"h":331,"resize":"fit"},"medium":{"w":1018,"h":331,"resize":"fit"}},"id":104032165678944257}],"urls":[],"user_mentions":[]},"in_reply_to_screen_name":null,"source":"\u003Ca href=\"http:\/\/myflashpics.com\/\" rel=\"nofollow\"\u003EFlashPics\u003C\/a\u003E","in_reply_to_user_id_str":null,"contributors":null,"place":null,"retweeted":false,"in_reply_to_user_id":null,"geo":null,"user":{"follow_request_sent":false,"contributors_enabled":false,"favourites_count":0,"profile_sidebar_fill_color":"dbdbdb","url":"http:\/\/www.yourwaywebsites.com\/","profile_image_url_https":"https:\/\/si0.twimg.com\/profile_images\/795852708\/twittericon_normal.png","location":"","id_str":"129314956","notifications":false,"profile_background_tile":false,"description":"Hello, I am Brandon Vento, the founder of Your Way Websites. Our company is a small business that provides web design services to a variety of clients. ","show_all_inline_media":false,"geo_enabled":false,"lang":"en","created_at":"Sat Apr 03 22:20:26 +0000 2010","profile_link_color":"383838","profile_image_url":"http:\/\/a3.twimg.com\/profile_images\/795852708\/twittericon_normal.png","listed_count":0,"profile_sidebar_border_color":"c7c7c7","time_zone":null,"screen_name":"yourwaywebsites","profile_use_background_image":false,"statuses_count":10,"friends_count":9,"profile_background_color":"292727","protected":false,"default_profile_image":false,"following":false,"verified":false,"profile_background_image_url":"http:\/\/a0.twimg.com\/images\/themes\/theme1\/bg.png","followers_count":2,"name":"Your Way Websites","default_profile":false,"id":129314956,"is_translator":false,"profile_background_image_url_https":"https:\/\/si0.twimg.com\/images\/themes\/theme1\/bg.png","utc_offset":null,"profile_text_color":"575757"},"retweet_count":0,"coordinates":null,"truncated":false,"id":104032165674749952,"possibly_sensitive":false} [info] =&gt; Array ( [url] =&gt; https://upload.twitter.com/1/statuses/update_with_media.json [content_type] =&gt; application/json; charset=utf-8 [http_code] =&gt; 200 [header_size] =&gt; 1563 [request_size] =&gt; 559 [filetime] =&gt; -1 [ssl_verify_result] =&gt; 0 [redirect_count] =&gt; 0 [total_time] =&gt; 1.286434 [namelookup_time] =&gt; 0.123698 [connect_time] =&gt; 0.187714 [pretransfer_time] =&gt; 0.432981 [size_upload] =&gt; 20560 [size_download] =&gt; 2580 [speed_download] =&gt; 2005 [speed_upload] =&gt; 15982 [download_content_length] =&gt; 2580 [upload_content_length] =&gt; 20560 [starttransfer_time] =&gt; 0.433422 [redirect_time] =&gt; 0 [request_header] =&gt; POST /1/statuses/update_with_media.json HTTP/1.1 User-Agent: themattharris' HTTP Client Host: upload.twitter.com Accept: */* Authorization: OAuth oauth_consumer_key="nY4E8qXJVxICLYTs9R2BLQ", oauth_nonce="dfac47eb37ca8897cf2542123d1638f9", oauth_signature="lHjemKp%2BJVmVgD3cQ9ady4Qb66o%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1313638299", oauth_token="129314956-PJCTyRqrhoTr5IyLGkma9CjDbss5Uohtml2qMmll", oauth_version="1.0" Content-Length: 20560 Content-Type: multipart/form-data; boundary=----------------------------258aadd70f93 ) ) ) 
  </code></pre>