But wait, there’s an Answers.com API? A few pokes at the Google machine reveal nothing relevant, and Asnwers.com’s site is mum too. Taking apart the code, I get the following (modded enough to make it run-able if you drop it in the base of your WordPress install):
|``` require_once('wp-config.php'); require_once(ABSPATH.WPINC.'/class-snoopy.php'); $snoop = new Snoopy; $snoop->read_timeout = 5; $snoop->submit( 'http://alink.answers.com/link/xml' , array( 'text' => “Put a long-ish string of meaningful text here, then look for interesting stuff in the print_r'd output.” ) ); print_r($snoop->results); ```|
If the input string isn’t sufficiently long, the output will be empty (eliminating one of my potential uses for it), but it’s interesting to twiddle.