#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?is)^(?:[[:^print:][:cntrl:]\s]|GIF89.{0,20})*(?:<[^>]+>\s*)+<title>contador\s*de \s*acessos<\/title>.{0,1350}?\$caminho\s*=\s*"contador\.txt.{0,150}?\$arquivo\s*=\s*fopen\(\$caminho.{0,150}?numero\s*de\s*visitas\s*fclose\(\$arquivo.{0,650}?<meta.{0,50}?url=['"]contador\.php.{0,50}?\/html[[:punct:]\s]+$"
Local $sString = "<html>" & @CRLF & _
"<head>" & @CRLF & _
"<title>Contador de Acessos</title>" & @CRLF & _
"<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">" & @CRLF & _
"<!--" & @CRLF & _
"body,td,th {" & @CRLF & _
" color: #FF0000;" & @CRLF & _
" font-family: Verdana;" & @CRLF & _
" font-size: 12px;" & @CRLF & _
"}" & @CRLF & _
"body {" & @CRLF & _
" background-color: #CCCCCC;" & @CRLF & _
"}" & @CRLF & _
".style1 {" & @CRLF & _
" font-size: 15px;" & @CRLF & _
" font-weight: bold;" & @CRLF & _
"}" & @CRLF & _
".style2 {" & @CRLF & _
" font-size: 12px;" & @CRLF & _
" color: #FF0000;" & @CRLF & _
"}" & @CRLF & _
".style3 {" & @CRLF & _
" font-size: 15px;" & @CRLF & _
" color: #000000;" & @CRLF & _
"}" & @CRLF & _
".style4 {color: #000000}" & @CRLF & _
".style5 {font-size: 15px; font-weight: bold; color: #000000; }" & @CRLF & _
".style8 {font-size: 24px; font-weight: bold; }" & @CRLF & _
".style9 {color: #CCCCCC}" & @CRLF & _
".style11 {color: #FF0000}" & @CRLF & _
".style12 {color: #FFFFFF}" & @CRLF & _
".style15 {color: #FFFFFF; font-size: 20px; }" & @CRLF & _
"-->" & @CRLF & _
"</style><body link="#FF0000" vlink="#FF0000" alink="#FF0000">" & @CRLF & _
"<center>" & @CRLF & _
" <table width="476" border="0">" & @CRLF & _
" <tr>" & @CRLF & _
" <td width="470" bgcolor="#000000"><div align="center"><span class="style15"> CONTADOR - <span class="style11">BB</span></span> </div></td>" & @CRLF & _
" </tr>" & @CRLF & _
" </table>" & @CRLF & _
" <p><span class="style5"> $$ CONTADOR DE ACESSOS $$ <br>" & @CRLF & _
" <br> " & @CRLF & _
" <span class="style2">==========================================================</span><br>" & @CRLF & _
" </span><br>" & @CRLF & _
" <span class="style4">VOCÊ POSSUI<span class="style9">-</span> </span>" & @CRLF & _
" </h1>" & @CRLF & _
" <span class="style8">" & @CRLF & _
" <?php" & @CRLF & _
" $caminho = "contador.txt";//nome do arquivo que vai guardar os visitantes" & @CRLF & _
" $arquivo = fopen($caminho, "r");//abre o arquivo" & @CRLF & _
" $total = fgets($arquivo,1024); //pega o numero de visitas" & @CRLF & _
" fclose($arquivo);//fecha o arquivo" & @CRLF & _
" $x = $total;" & @CRLF & _
" echo "" . $x;//mostra na tela o numero de visitantes" & @CRLF & _
"?>" & @CRLF & _
" </span> <span class="style4"> CLIQUES.</span> <br>" & @CRLF & _
" <br>" & @CRLF & _
" <br>" & @CRLF & _
" <br>" & @CRLF & _
" <span class="style4"><strong>OBS:</strong> A PÁGINA FICA ATUALIZANDO AUTOMATICAMENTE EM 60 SEGUNDOS. </span></p>" & @CRLF & _
" <table width="568" border="0">" & @CRLF & _
" <tr>" & @CRLF & _
" <td bgcolor="#000000"><div align="center"><span class="style12">CONTADOR SPAM<span class="style11"></span></span></div></td>" & @CRLF & _
" </tr>" & @CRLF & _
" </table>" & @CRLF & _
" <p><br>" & @CRLF & _
" </p>" & @CRLF & _
" <meta http-equiv='Refresh' content='60'; URL='contador.php'>" & @CRLF & _
"</center>" & @CRLF & _
"</body>" & @CRLF & _
"</head>" & @CRLF & _
"</html>"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm