// Jon Meyer, January 2005. // ?>
This is a personalized filter that gives a website the appearance of the New York Times circa 1860.
See this blog post for more info, and for links to other works by Jon Meyer. | source code available.
Instructions: Click on the Go button at the top of this page (takes about ten seconds).
"; ?> \n"; } else { // Get the contents of the web page $out = "GET / HTTP/1.1\r\n"; $out .= "Host: " . $site. "\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); $text = ""; $started = true; while (!feof($fp)) { $line = fgets($fp, 512); if (strpos(strtolower($line), "cookie")) continue; //!$started && strpos(strtolower($line),"body")) $started = true; if ($started) $text = $text . $line; } fclose($fp); // Convert it to text $asciiText = new Html2Text ($text, 300); // 80 columns maximum $text = $asciiText->convert(); // // TIP: USE View>Source to see PHP the source code for this page // $len = strlen($text); // Split it into 5 equal columns $cols = array(); $ncols = 5; $nchars = $len / $ncols; for ($i = 0; $i < $ncols; $i++) { $col = substr($text, $i*($nchars), $nchars); foreach ($companies as $j => $value) { $col= str_replace($value . " ", "| VOLUME CLIV | FREE |