module to show wan side IP in "real time" Thread last updated on 2004-06-10 06:21:38

Posted by member 52970 on 2004-06-09 19:45:42

hi all..
does anyone knows were i can find a module with such function?
..like a litle box showing the Wam IP in real time!
i would do this if i know how to :(

thanks for the help!

Posted by member 1 on 2004-06-10 02:24:52 link

If you are displaying your LAN IP instead of your WAN it means that another device has your WAN IP. If that device is a Linux box/router you could do it with an awk statement run by cron. If however the device is a "router in a box" you are out of luck because that device has the IP you are looking for and your "WAN IP" on your machine is actually just a NAT address for your router.

Posted by member 45783 on 2004-06-10 02:31:30 link

He COULD of course use an external solution to get his IP (such as http://www.ankka.com/?ip) and parse the result somehow, but such is beyond my skills.

Posted by member 52970 on 2004-06-10 05:13:13 link

..but! it could be some script that could grab my ip from the outside! like having a php script somewere (outside) linked to this module... the module would only be a window showing the result of the php script!

Posted by member 103440 on 2004-06-10 06:21:38 link

Hi fosi! I have the solution :D. You can use Wazup-1.35 to get the external IP for you and display the result in any label. Wazup is a plugin that parses web pages (nothing compared with samurize but ... )
Here is the code:
;----------------
;Check External IP
;----------------
*Wazup IpCheck

IpCheckUpdateInterval 1800
IpCheckURL http://checkip.dyndns.org
IpCheckInputString "Current IP Address: {%}"
IpCheckOutputString "IP: {%1}"
IpCheckOnChecked !Execute [!WazupSetUpdateInterval IpCheck 9999999]
IF WaZupVerboseOn
IpCheckOnFailure !Execute [!WazupSetUpdateInterval IpCheck 60] [!alert "Error: IP was not updated."]
IpCheckOnUpdated !alert "IP has been update"
ELSE
IpCheckOnFailure !Execute [!WazupSetUpdateInterval IpCheck 60]
ENDIF
IpCheckLocalFile "$ConfigDir$wazup_ip.html"
IpCheckEnabled true
IpCheckSilent true
IpCheckDisplayOn IpLabel ;This is a label you should create do display the IP.