> home
> how we work
> who we're working for
> about us
> publications
> buy apache essentials
> client login

play
static·red
edmonton and area web development

Current Projects

Edmonton Weather


>>Le blog.

speakeasy archives


...and something else.

<< something I wrote... | Main | HOLY FUCK. >>

And, because I needed an easy way to translate the HTML tags to regular text suitable for posting, I had to write this little PHP script. (See inside)

<? global $data;

if (!$data) {
?>
<html>
<body>
<form action=‚translate.php‚ method=‚post‚>
<textarea rows=‚20‚ cols=‚80‚ name=‚data‚>
</textarea><br/>
<input type=‚submit‚>
<input type=‚reset‚>
</form>
</body>
</html><?
}
elseif ($data) {

$data = ereg_replace(‚<‚,‚<‚,$data);
$data = ereg_replace(‚>‚,‚>‚,$data);
$data = ereg_replace(‚\\\\\\'‚,‚'‚,$data);
$data = ereg_replace(‚\\\\\\\\\\‚‚,‚‚‚,$data);
header(‚content-type: text‚);
echo $data;
}
?>

Posted by Darren James Harkness on Wednesday, December 11, 2002 04:27 PM
Trackbacks...


Comments:

Post a comment









Remember personal info?


Comments:


* under no circumstances will your email address be traded for a sack of quarters. No-sirree.