[PHP] Funcion ASCII a HTML [x venom xd]

Iniciado por ANTRAX, Febrero 24, 2010, 11:29:31 AM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

Febrero 24, 2010, 11:29:31 AM Ultima modificación: Marzo 22, 2014, 02:23:55 PM por Expermicid
hice esta funcion hace algunos dias, siempre es conveniente tener codes ^^

Código: php

<?php

// c0dd3d by Venom XD
// 18/01/09

function ASCIIaHTML($texto) { 

$texto = htmlentities($texto); 
$partes = split("\n\n",$texto); 

for ($i = 0, $j = count($partes); $i < $j; $i++) { 
$partes[$i] = preg_replace("/((http:\/\/[^\s&]+)/", "$1",$partes[$i]); 
$partes[$i] = "".$partes[$i].""; 

return join("\n\n",$partes); 
}

?>