This is a PHP script that will load the specified HTML document and convert it to a data URL. It's Useful for generating off-line web apps, especially for the iPhone. It makes 3 passes which do the following.
It does not currently convert linked CSS but adding that should be trivial.
This is a modified version of the code which converts only url's in <img> tags into data. This base_64 encodes the binary image data and embeds that data into the HTML file itself. Here's how you use it.
img2data.php index.html > combined.html
That command reads index.html, parses all of the included images, and stores the result in combined.html.
This source code is distributed under the MIT License.