FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 25
→
WX - Meu Ip Fixo Externo
WX - Meu Ip Fixo Externo
Débuté par adrianoboller, 18 juil. 2015 19:31 - 2 réponses
Connectez-vous…
adrianoboller
#1
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 18 juillet 2015 - 19:31
Procedure
MeuIpFixo
(
)
// function showInfos(){
//
setTimeout('document.getElementById("div_ip").innerHTML = "177.6.166.73"', 1000);
//
setTimeout('document.getElementById("div_reverso").innerHTML = "4130757575.e.brasiltelecom.net.br"', 2000);
//
setTimeout('document.getElementById("div_provedor").innerHTML = "VELOX"', 3000);
//
//
}
n
InicioBloco
,
n
FinalBloco is
int
=
0
IP is
string
=
""
Url is
string
=
"http://www.meuip.com.br/"
HTTPRequest
(
Url
)
buf
Retorno is Buffer
=
HTTPGetResult
(
httpResult
)
buf
Retorno
=
Replace
(
buf
Retorno
,
Charact
(
34
)
,
""
)
buf
Retorno
=
Replace
(
buf
Retorno
,
"'"
,
""
)
Info
(
buf
Retorno
)
n
InicioBloco
=
PositionOccurrence
(
buf
Retorno
,
"document.getElementById(div_ip).innerHTML = "
,
firstRank
,
FromBeginning
) +
Length
(
"document.getElementById(div_ip).innerHTML = "
)
Info
(
buf
Retorno
)
IF
n
InicioBloco
>
0
THEN
//document.getElementById(div_ip).innerHTML = 177.6.166.73, 1000);
// setTimeout(document.getElementById(div_reverso).innerHTML = 4130757575.e.brasiltelecom.net.br, 2000);
//
setTimeout(document.getElementById(div_provedor).innerHTML = VELOX, 3000);
//
// }
// </script>
//
// <div align=left ><br>
// <H1><b> Meu IP: <div id=div_ip style=display:inline><!--<span class=style1> detectando (IPv4 ou IPv6)...</span>--> 177.6.166.73 </div> </b>
buf
Retorno
=
Middle
(
buf
Retorno
,
n
InicioBloco
,
1000
)
IF
n
InicioBloco
>
0
buf
Retorno
=
Middle
(
buf
Retorno
,
1
,
20
)
END
Info
(
buf
Retorno
)
ELSE
// <div align=left ><br>
// <H1><b> Meu IP: <div id=div_ip style=display:inline><!--<span class=style1> detectando (IPv4 ou IPv6)...</span>--> 177.6.166.73 </div> </b>
n
InicioBloco
=
PositionOccurrence
(
buf
Retorno
,
"<span class=style1> detectando (IPv4 ou IPv6)...</span>-->"
,
firstRank
,
FromBeginning
) +
Length
(
"<span class=style1> detectando (IPv4 ou IPv6)...</span>-->"
)
IF
n
InicioBloco
>
0
buf
Retorno
=
Middle
(
buf
Retorno
,
n
InicioBloco
,
20
)
END
Info
(
buf
Retorno
)
END
//192.168.1.180, 1000);
IF
buf
Retorno
<
>
""
n
FinalBloco
=
PositionOccurrence
(
buf
Retorno
,
","
,
firstRank
,
FromBeginning
) -
1
IF
n
FinalBloco
>
0
THEN
buf
Retorno
=
Middle
(
buf
Retorno
,
1
,
n
FinalBloco
)
END
END
Info
(
buf
Retorno
)
IP
=
NoSpace
(
buf
Retorno
)
RESULT
(
IP
Signaler
0
0
adrianoboller
#2
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 18 juillet 2015 - 19:32
Forma de usar:
ip_fixo is
string
=
MeuIpFixo
(
)
Signaler
0
0
adrianoboller
#3
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 18 juillet 2015 - 19:32
Signaler
0
0
→ Revenir à WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte