Tags: script,php,css

Sort by: Date / Title /

  1. 1 year ago by spawnrider
    Il reste encore des améliorations à faire...
    1. function html2txt($document){
    2.         $search = array('@<script[^>]*?>.*?</script>@si', // Strip out javascript
    3.         '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly
    4.         '@<[?]php[^>].*?[?]>@si', //scripts php
    5.         '@<[?][^>].*?[?]>@si', //scripts php
    6.         '@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags
    7.         '@<![\s\S]*?--[ \t\n\r]*>@', // Strip multi-line comments including CDATA
    8.         );
    9.         $text = preg_replace($search, '', $document);
    10.         return $text;
    11. }

First / Previous / Next / Last / Page 1 of 1 (1 posteets)