(lo unico q kiero q se vea como estoooo!!)
Código PHP:
<?php
if (isset($_GET['Aceptar']))
{
function ColoreaCodigo($texto) {
$texto = str_replace("
", "", $texto);
$texto = str_replace("
", "", $texto);
$texto = str_replace(">", ">", $texto);
$texto = str_replace("<", "<", $texto);
$texto = str_replace("&", "&", $texto);
$texto = str_replace('$', '$', $texto);
$texto = str_replace('n', 'n', $texto);
$texto = str_replace('r', 'r', $texto);
$texto = str_replace('t', 't', $texto);
$texto = str_replace('"', '"', $texto);
$texto = stripslashes($texto);
ob_start();
$nivelviejo=error_reporting(0);
highlight_string($texto);
error_reporting($nivelviejo);
$buffer = ob_get_contents();
ob_end_clean();
if ($variable) {
$abrirpost = strpos($buffer,'<?');
$cerrarpost = strrpos($buffer, '?');
$buffer=substr($buffer, 0, $abrirpost).substr($buffer, $abrirpost+5, $cerrarpost-($abrirpost+5)).substr($buffer, $cerrarpost+5);
}
$buffer=str_replace(" ","",$buffer);
$buffer=str_replace(" ","",$buffer);
return $buffer;
}
$codigo=$_GET['textarea'];
$codigo=ColoreaCodigo($codigo);
echo "$codigo";
}
else
{?>
<form name="form1" method="get" action="">
<p>
<textarea name="textarea" cols="70" rows="10"></textarea>
</p>
<p>
<input name="Aceptar" type="submit" id="Aceptar" value="Enviar">
</p>
</form>
<?php
}
?>
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
gracias de antemano!! y saludos desde cadiiiiiiiii!!