Title: API request returns HTML
Last modified: August 21, 2016

---

# API request returns HTML

 *  Resolved [Bill Hill](https://wordpress.org/support/users/bill-hill/)
 * (@bill-hill)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/api-request-returns-html/)
 * I started working with this API about two weeks ago and everything was working
   just fine.
 * A couple of days ago, the API suddenly started returning strange stuff: Some 
   weird, short HTML code and (after the closing `</html>` tag) the actual JSON 
   response.
 * I tried re-installing it, but that didn’t help. Any idea?
 * Example: [http://lolkitten.org/api/get_recent_posts/?count=1&page=1](http://lolkitten.org/api/get_recent_posts/?count=1&page=1)
 * Cheers,
    Cedric
 * [https://wordpress.org/plugins/json-api/](https://wordpress.org/plugins/json-api/)

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

 *  Thread Starter [Bill Hill](https://wordpress.org/support/users/bill-hill/)
 * (@bill-hill)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/api-request-returns-html/#post-4725210)
 * Ok, I just found some unwanted code in a couple of php files: `eval(decode(...))`(
   but a huge cryptic string instead of …), which would probably produce some iframe
   on my page with dishonest intentions.
 * I hope I could remove all of them.
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [12 years, 1 month ago](https://wordpress.org/support/topic/api-request-returns-html/#post-4725231)
 * > Ok, I just found some unwanted code in a couple of php files: `eval(decode(...))`
 * That’s really not good. Your site is hacked.
 * > I hope I could remove all of them.
 * It’s doable but it’s a lot of work to delouse your installation. Start with the
   standard reading material for hacked sites.
 * [http://codex.wordpress.org/FAQ_My_site_was_hacked](http://codex.wordpress.org/FAQ_My_site_was_hacked)
   
   [http://wordpress.org/support/topic/268083#post-1065779](http://wordpress.org/support/topic/268083#post-1065779)
   [http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/](http://smackdown.blogsblogsblogs.com/2008/06/24/how-to-completely-clean-your-hacked-wordpress-installation/)
   [http://ottopress.com/2009/hacked-wordpress-backdoors/](http://ottopress.com/2009/hacked-wordpress-backdoors/)
 * Additional Resources:
    [Hardening WordPress](http://codex.wordpress.org/Hardening_WordPress)
   [http://sitecheck.sucuri.net/scanner/](http://sitecheck.sucuri.net/scanner/) 
   [http://www.unmaskparasites.com/](http://www.unmaskparasites.com/) [http://blog.sucuri.net/2012/03/wordpress-understanding-its-true-vulnerability.html](http://blog.sucuri.net/2012/03/wordpress-understanding-its-true-vulnerability.html)
 *  Thread Starter [Bill Hill](https://wordpress.org/support/users/bill-hill/)
 * (@bill-hill)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/api-request-returns-html/#post-4725284)
 * Thank you for those resources. I scanned my active theme directory for `eval(...`
   expressions and found three more.
 * Now I installed a security plugin to check everything and to get instantly alerted
   in the future if something like that should happen again.
 * Still, I don’t know where it came from… I suspect it might have been a plugin,
   but I have no idea which one (I’m using 22 right now). Anyway, I’m thinking about
   a complete re-design, which I could use as a chance to take a completely fresh
   installation.
 * Cheers,
    Cedric

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

The topic ‘API request returns HTML’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/json-api.svg)
 * [JSON API](https://wordpress.org/plugins/json-api/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/json-api/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/json-api/)
 * [Active Topics](https://wordpress.org/support/plugin/json-api/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/json-api/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/json-api/reviews/)

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)
 * [response](https://wordpress.org/support/topic-tag/response/)

 * 3 replies
 * 2 participants
 * Last reply from: [Bill Hill](https://wordpress.org/support/users/bill-hill/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/api-request-returns-html/#post-4725284)
 * Status: resolved