IXR_IntrospectionServer(); $this->addCallback( 'w3c.validate', 'this:validate', array('struct', 'string'), "Queries the W3C's beta validator and returns a struct representing the result" ); $this->serve(); } function validate($site) { if (ipLimitOk()) { $validator = new W3cValidator; return $validator->validate($site); } else { return new IXR_Error(100, 'There have been too many requests from your IP in the past hour. Please try again later.'); } } } $s = new ValidationServer; ?>