<?php
$html = '<html>
<head>
<title>pagina</title>
</head>
<body>
<div class="listdoTexto">
<ul>
<li class="texto"><a href="textolink">texto1 qualquer</a></li>
<li class="texto"><a href="textolink">texto2</a></li>
<li class="texto"><a href="textolink">texto3</a></li>
<li class="texto"><a href="textolink">texto4</a></li>
</ul>
</div>
<div class="listdoTexto2">
<ul>
<li class="texto"><a href="textolink">texto5</a></li>
</ul>
</div>
</body>
</html>';
$url = "http://d...content-available-to-author-only...s.ws/teste2.html?6";
//$html = file_get_contents($url);
$getTextoList = '|<div class="listdoTexto">[\w\W]*<\/ul>|';
$GetTexto = implode(",", $GetTexto[0]); $GetTexto = substr($GetTexto, 0, strpos($GetTexto, "</ul>")); //
echo $GetTexto;
PD9waHAKCiRodG1sID0gJzxodG1sPgo8aGVhZD4KPHRpdGxlPnBhZ2luYTwvdGl0bGU+Cgo8L2hlYWQ+Cjxib2R5PgoKPGRpdiBjbGFzcz0ibGlzdGRvVGV4dG8iPgogICA8dWw+CiAgICAgIDxsaSBjbGFzcz0idGV4dG8iPjxhIGhyZWY9InRleHRvbGluayI+dGV4dG8xIHF1YWxxdWVyPC9hPjwvbGk+CiAgICAgIDxsaSBjbGFzcz0idGV4dG8iPjxhIGhyZWY9InRleHRvbGluayI+dGV4dG8yPC9hPjwvbGk+CiAgICAgIDxsaSBjbGFzcz0idGV4dG8iPjxhIGhyZWY9InRleHRvbGluayI+dGV4dG8zPC9hPjwvbGk+CiAgICAgIDxsaSBjbGFzcz0idGV4dG8iPjxhIGhyZWY9InRleHRvbGluayI+dGV4dG80PC9hPjwvbGk+CiAgIDwvdWw+CjwvZGl2PgoKPGRpdiBjbGFzcz0ibGlzdGRvVGV4dG8yIj4KICAgPHVsPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgIDxsaSBjbGFzcz0idGV4dG8iPjxhIGhyZWY9InRleHRvbGluayI+dGV4dG81PC9hPjwvbGk+Ci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