Title: [Plugin: ThinkTwit] file_get_contents error
Last modified: August 20, 2016

---

# [Plugin: ThinkTwit] file_get_contents error

 *  Resolved [fronbow](https://wordpress.org/support/users/fronbow/)
 * (@fronbow)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-thinktwit-file_get_contents-error/)
 * `Warning: file_get_contents(http://twitter.com/users/***.xml) [function.file-
   get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request
   in /home/***/public_html/wp-content/plugins/thinktwit/thinktwit.php on line 369`
 * Hi
 * I’m getting the above error, usually when twitter is over capacity or just having
   problems 🙁
    Is there any way of just logging the error and not writing it out
   to the site?
 * Cheers
 * [http://wordpress.org/extend/plugins/thinktwit/](http://wordpress.org/extend/plugins/thinktwit/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Stephen Pickett](https://wordpress.org/support/users/stephenpickett/)
 * (@stephenpickett)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-thinktwit-file_get_contents-error/#post-2684223)
 * Hi Fronbow,
 * I’m aware of the error and it is on my list of issues to fix (by introducing 
   caching of user profiles). In the meantime I would recommend that you turn off
   E_WARNING level errors:
 * [http://php.net/manual/en/function.error-reporting.php](http://php.net/manual/en/function.error-reporting.php)
 * If you aren’t familiar with PHP then I suggest you read:
 * [http://wordpress.org/support/topic/hide-php-error-message?replies=5](http://wordpress.org/support/topic/hide-php-error-message?replies=5)
 * I don’t yet have a timeline on my fix as my job is very busy at the moment so
   ThinkTwit updates are taking a backseat currently.
 *  Thread Starter [fronbow](https://wordpress.org/support/users/fronbow/)
 * (@fronbow)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-thinktwit-file_get_contents-error/#post-2684224)
 * Hi Stephen,
 * as a quick fix I just changed line 369 to this
    `$feed = @file_get_contents($
   url);`
 * On failure, file_get_contents() returns false. So maybe you need to use another
   way of grabbing the feed in order to catch errors like this?
 * See [ for more on suppressing errors.](http://php.net/manual/en/language.operators.errorcontrol.php)
 * I don’t think the function needs anything more as you’re checking for a valid
   array or returning false anyway.
 *  Plugin Author [Stephen Pickett](https://wordpress.org/support/users/stephenpickett/)
 * (@stephenpickett)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-thinktwit-file_get_contents-error/#post-2684226)
 * Hi Fronbow,
 * I wasn’t aware of use of the @ symbol to suppress errors – thanks for that! And
   glad you were able to solve the issue for yourself easily enough.
 * Excessive requests are a constant problem so I will be fixing it when I have 
   time, until then hope this will do for you 🙂
 *  Plugin Author [Stephen Pickett](https://wordpress.org/support/users/stephenpickett/)
 * (@stephenpickett)
 * [14 years ago](https://wordpress.org/support/topic/plugin-thinktwit-file_get_contents-error/#post-2684338)
 * FYI I have coded a fix over the weekend which will fix issues related to avatars
   not showing due to too many API requests. This will be rolled out shortly.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: ThinkTwit] file_get_contents error’ is closed to new replies.

 * ![](https://ps.w.org/thinktwit/assets/icon-256x256.png?rev=2543224)
 * [ThinkTwit](https://wordpress.org/plugins/thinktwit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/thinktwit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/thinktwit/)
 * [Active Topics](https://wordpress.org/support/plugin/thinktwit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/thinktwit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/thinktwit/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Stephen Pickett](https://wordpress.org/support/users/stephenpickett/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/plugin-thinktwit-file_get_contents-error/#post-2684338)
 * Status: resolved