Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

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 
  
    2007-06-28
   * Props to http://infohound.net/tidy */
  return file_get_contents("http://logankoester.com/tools/tidy.php?q=$url");
}

  
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}