|
Iniciado por adrianoboller, jul., 18 2015 7:31 PM - 2 respostas |
| |
| | | |
|
| |
Membro registado 3.651 mensagems Popularité : +175 (223 votes) |
|
Publicado em julho, 18 2015 - 7:31 PM |
Procedure MeuIpFixo()
nInicioBloco, nFinalBloco is int = 0
IP is string = ""
Url is string = "http://www.meuip.com.br/"
HTTPRequest(Url)
bufRetorno is Buffer = HTTPGetResult(httpResult)
bufRetorno = Replace(bufRetorno,Charact(34),"")
bufRetorno = Replace(bufRetorno,"'","")
Info(bufRetorno)
nInicioBloco = PositionOccurrence(bufRetorno,"document.getElementById(div_ip).innerHTML = ",firstRank,FromBeginning) + Length("document.getElementById(div_ip).innerHTML = ")
Info(bufRetorno)
IF nInicioBloco > 0 THEN
bufRetorno = Middle(bufRetorno,nInicioBloco,1000)
IF nInicioBloco > 0 bufRetorno = Middle(bufRetorno,1,20) END
Info(bufRetorno)
ELSE
nInicioBloco = PositionOccurrence(bufRetorno,"<span class=style1> detectando (IPv4 ou IPv6)...</span>-->",firstRank,FromBeginning) + Length("<span class=style1> detectando (IPv4 ou IPv6)...</span>-->")
IF nInicioBloco > 0 bufRetorno = Middle(bufRetorno,nInicioBloco,20) END
Info(bufRetorno)
END
IF bufRetorno <> ""
nFinalBloco = PositionOccurrence(bufRetorno,",",firstRank,FromBeginning) - 1
IF nFinalBloco > 0 THEN bufRetorno = Middle(bufRetorno,1,nFinalBloco) END
END
Info(bufRetorno)
IP = NoSpace(bufRetorno)
RESULT(IP |
| |
| |
| | | |
|
| | |
| |
Membro registado 3.651 mensagems Popularité : +175 (223 votes) |
|
Publicado em julho, 18 2015 - 7:32 PM |
Forma de usar:
ip_fixo is string = MeuIpFixo() |
| |
| |
| | | |
|
| | |
| |
Membro registado 3.651 mensagems Popularité : +175 (223 votes) |
|
Publicado em julho, 18 2015 - 7:32 PM |
| |
| |
| | | |
|
| | | | |
| | |
|