View Full Version : Text only
05-06-2006, 05:28 PM
Any ideas on where i can find a server side script either php or Perl/CGI that will convert any html page into text only for accessibilty.??
05-07-2006, 02:03 PM
You do mean to convert one of your own pages to plain text, don't you? From the same server?
This should do it...
$file = file_get_contents("filename.htm");
$text = preg_replace("/\<sty(.+?)\yle>/is", "", $file);
(Just put the filename in).
there's no reason to strip out the HTML, things like headings and paragraphs help to make pages make sense.
Just make sure that the pages you make don't rely on images, colour or bizarre positioning to make sense, and users should be able to browse the site how they prefer, whether that be with a 'regular' browser, a text-based one or a screen-reader.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.