PDA

View Full Version : View IP Adress


chrissus
03-14-2006, 07:16 AM
Is it possible to show my ip adress, when i opens the autorun exe..

Friethoe
03-14-2006, 07:28 AM
Is it possible to show my ip adress, when i opens the autorun exe..


Yeah, it depends how you want to display it.
You can get the IP-address by using the following function:
lan = System.GetLANInfo();
LanIP = lan.IP;

Now it's up to you how you want to display the address.

Good luck!

TJS
03-14-2006, 07:31 AM
No problem... try adding something like this to the "On Startup" event in your project:

Dialog.Message("IP Address","Your system's current IP Address is "..System.GetLANInfo().IP);

chrissus
03-14-2006, 10:39 AM
Thanks.. but it only shows the lan ip 192.168.1.5..
is it possible to show the ip.. Fx on http://www.showmyip.com is the ip viewed...

TJ_Tigger
03-14-2006, 10:58 AM
I you have a server that will run PHP you can use a script like the following and then query that script from AMS to find your routers IP.

<?php
if (!$ip)
{
$ip = $_SERVER['REMOTE_ADDR'];
$host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
echo '<meta **********="refresh" content="0;URL=http://yoursitehere.com/findmyip.php?ip='.$ip.'?host='.$host.'">';
}
?>

Save the above script to your site as findmyip.php and edit the yoursitehere.com to your site. It works well. Worm had a dll or code that would do something similar.

Tigg

TJ_Tigger
03-14-2006, 11:00 AM
Here is a thread that shows how to do it. thanks to sside

http://www.indigorose.com/forums/showthread.php?t=10277&highlight=router

chrissus
03-14-2006, 11:10 AM
Okay.. i made an account here: http://www.hostedscripts.dk/
is it possible to insert that code:

IP adress:
<script type="text/javascript" src="http://www.hostedscripts.dk/basic/basic.php?uid=5502&showip=1"></script>

TJ_Tigger
03-14-2006, 11:21 AM
You should be able to do that in a Web object.

Tigg

chrissus
03-14-2006, 11:25 AM
Yes, the borders around the web object, can these being removed so its flat stylet and matches the page..

TJ_Tigger
03-14-2006, 12:18 PM
Yes you can apply a mask to that object. If AMS does not support it directly, Worm's setmask will do the job.

Tigg