Hi,

I was wondering how you can attach everything from a html source, so all the spaces, all the tabs, newlines are gone and everything is glued togheter?

I tried with implode, but that doesn't do anything because I can't get rid of the spaces, tabs, newlines etc. Is there an easy way to achieve this?

You can try this online HTML optimizer, http://www.iwebtool.com/html_optimizer

After you've got the optimized code, you'll notice there's still some whitespace, so type this in:

<?php
$html = "HTML";
$optimized = str_replace("> <", "", $html);
echo "<code>".$optimized."</code>";
?>

I haven't tested the above PHP code, but it should work.

Is it possible to let the script send the html source to the site. The site optimizes it, and then I get it back? Is there an automated way to do is?

IT's K, I made a optimizer myself with help from annother script =p

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.