Guest User

Untitled

a guest
Jan 22nd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. <span style="font-size:18px">
  2. <span style="font-family:helvetica-light"><span style="color:rgb(140, 190, 207)">Cultura</span></span></span></p>
  3. <p>&nbsp;</p>
  4. <h2 style="text-align:center"><span style="font-size:42px"><span style="color:rgb(140, 190, 207)"><strong><span style="font-family:helveticaneue">O CIRCO CHEGOU!</span></strong></span></span></h2>
  5. <p style="margin-left:80px; margin-right:80px; text-align:center"><span style="color:rgb(71, 71, 71); font-family:helveticaneue-light; font-size:30px">Cirque du Soleil apresenta espet&aacute;culo &ldquo;Amaluna&rdquo; em S&atilde;o Paulo e no Rio de Janeiro, na sexta passagem da maior companhia circense do mundo pelo Brasil</span></p>
  6. <p style="text-align:center">&nbsp;</p>
  7. <p style="text-align:center"><span style="font-size:22px"><span style="font-family:helveticaneue"><span style="color:#8cbecf"><em>Por Melissa Schr&ouml;der -&nbsp;Edi&ccedil;&atilde;o de Andr&eacute; Schr&ouml;der</em><br />
  8. 25/09/2017</span></span></span></p>
  9.  
  10. <span style="color:rgb(140, 190, 207)"><strong><span style="font-family:helveticaneue">
  11.  
  12. public function htmlToTextTags($Document) {
  13. if (preg_match('/<img(.+)? style=".+?height:(4d|5d|6d|7d)(%|px);.+?"[^>]*>/', $Document, $matches)) {
  14. if(count($matches)) {
  15. $Document = str_replace($matches[0], "", $Document);
  16. }
  17. }
  18. $Rules = array (
  19. '@<script[^>]*?>.*?</script>@si',
  20. '@<style[^>]*?>.*?</style>@si',
  21. '@<h2 style="text-align:center">.*?</h2>@si',
  22. '@<span style="color:rgb((71, 71, 71)); font-family:helveticaneue-light.*?"?>*.?</span>@si',
  23. '@<span.*?><span style="color:#8cbecf">.*?</span></span>@si',
  24. '@<p style="text-align:center"><img.*?></p>@si',
  25. '@([rn])[s]+@',
  26. '@&(quot|#34);@i',
  27. '@&(amp|#38);@i',
  28. '@&(lt|#60);@i',
  29. '@&(gt|#62);@i',
  30. '@&(nbsp|#160);@i',
  31. '@<div style="transform: rotate((-90deg)); -webkit-transform: rotate((-90deg));.+"?>*.?</div>@'
  32. );
  33. $Replace = array (
  34. '',
  35. '',
  36. '',
  37. '',
  38. '',
  39. '',
  40. '',
  41. '"',
  42. '&',
  43. '<',
  44. '>',
  45. ' ',
  46. ''
  47. );
  48. return html_entity_decode(utf8_decode((preg_replace($Rules, $Replace, $Document))));
  49. }
Add Comment
Please, Sign In to add comment