Over a million developers have joined DZone.

Tidy Remote HTML (using A Web Service)

DZone's Guide to

Tidy Remote HTML (using A Web Service)

Free Resource
// Clean up some code using a web service. If you need to do this more quickly I suggest using a local tidy installation
// rather than my web service, but this is nice and easy. :)

function tidied($url) {
  /* Cleans up a page via Tidy, returning the cleaned up html as a string
   * By Logan Koester 
   * Props to http://infohound.net/tidy */
  return file_get_contents("http://logankoester.com/tools/tidy.php?q=$url");


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}