Sorry this might not be possible but is there a way to click on an icon to dispaly the current IP address. IF so good..
second if that is possible is there a way the pull an external IP though that command as well.
Professional Software Development Tools
Sorry this might not be possible but is there a way to click on an icon to dispaly the current IP address. IF so good..
second if that is possible is there a way the pull an external IP though that command as well.
Check out the System.GetLANInfo action which returns a table one of the items of which is the IP address.
You need the Pro version of AMS5
when you ay external IP address, is it another NIC in your PC or are you referring to a firewall/router box that is providing NAT? If so, I am not aware of a way to pull that information. If AMS could communicate via SNMP and your router had SNMP you could potentially use that.Originally Posted by slafta
Another route is to use the AMS HTTP actions to try and login securly to the router and obtain the IP address that way. But I don't know if it will be easy or possible.
Tigg
TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
You could use a web object and go to a site like:
http://www.findmyip.com
then parse the source for your extrernal IP.
In looking at the source to see how it is formatted, I found this
So I guess if you go that route, Please do not "script" this site without their permission.Code:<!-- Please do not "script" this site without permission --> <!-- Your IP address is:<br>127.0.0.1</FONT> --> <!-- Please do not "script" this site without permission -->
Looks like you would have to do a lot of scripting since they display your IP address with gif files. But the nice thing is that the name of the gifs are "1default.gif", "2default.gif", "3default.gif" etc or ".default.gif"
Tigg
Last edited by TJ_Tigger; 02-09-2005 at 08:49 AM.
TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
It would be helpful to know what the scenario behind this is. A DNS lookup would be more helpful would be my guess unless were talking about a machine IP and a network gateway 'outward facing' IP perhaps.
Last edited by longedge; 02-09-2005 at 01:31 PM.
This site returns information in the title bar of the window.
http://www.whatismyip.com/
Tigg
TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Here you have a application i did which will find your wan ip and host.
Can you share your project or how you accomplished the task?Originally Posted by sside
Thx
TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
Hey! What's my blood type doing in that list! (just'a kiddin')![]()
That works like a champ. Thanks for sharing sside!
![]()
Intrigued
Button On Click
PHP ScriptCode:url = Web.GetURL("Web1"); if (url ~= "") then if (url ~= "http://www.yoursite.com/script.php") then strurl = String.Replace(url, "http://www.yoursite.com/script.php?ip=", "", false); strwanip = String.Find(strurl, "?", 1, false); strhost = String.Find(strurl, "=", 1, false); wanip = String.Left(strurl, strwanip-1); host = String.Mid(strurl, strhost+1, -1); Input.SetText("InputLANIP", System.GetLANInfo().IP); Input.SetText("InputWANIP", wanip); Input.SetText("InputHOST", host); end end
PHP Code:<?php
if (!$ip)
{
$ip = $_SERVER['REMOTE_ADDR'];
$host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
echo '<meta **********="refresh" content="0;URL=http://www.yoursite.com/script.php?ip='.$ip.'?host='.$host.'">';
}
?>
Thanks sside, I figured it had to be a script on a remote server. Very nice. Gives me some good ideas for things I have wanted to do.
Tigg
TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
I looked at doing something that required LAN/WAN IP addresses recently. Now I know where to go on that one, thanks
[just need to get a script server set up!]
-
= Derek
["All glory comes from daring to begin" - fortune cookie]
Intrigued, Tigg, Derek, you're welcome. I hope you find this useful.
code the php site be executed locally, here is the scenario, i want to on click pull the values, and write to text files,
thanks