Hi all.

I'm a consultant working for several customers. I usually need to connect to their computers through internet. Some of them use dynamic ips so I have to call on them to ask for the ip to be able to make the connection .... :(

I wonder if there can be an "automatic" solution for this...

Thank you in advance. ;)

Carlita.

Recommended Answers

All 5 Replies

Thank you techniner.

I don't like my customers to have a fixed url, as this would increase their exposure to hackers. Also, the dynamic ip service would have their real ips at any moment.

Sincerely.

Carlita

Hello Carlita,

Then you need to dev a small app to report back to your server the current external ip addres so your client.

For example you can install a small app that uses rpc to push out the urrent ip address into a databse once every 3 hours or so.

Pretty easy actually..

You could even do something like schedule a iexplore job to hit a certain web page at a certain time and in that web page look up the current host that connected.

Only time this becomes an issue is when inter net is down.

PHP has built in $_SERVER;

variable..

so you could code something like:

<?

$ip=$_SERVER["REMOTE_ADDR"];
$ref=$_SERVER["HTTP_REFERER"];
$user_agent=$_SERVER["HTTP_USER_AGENT"];
$hostname=gethostbyaddr($_SERVER['REMOTE_ADDR']);
$char_set=$_SERVER["HTTP_ACCEPT_CHARSET"];
$encoding=$_SERVER['HTTP_ACCEPT_ENCODING'];
$lang=$_SERVER['HTTP_ACCEPT_LANGUAGE'];
$connection=$_SERVER['HTTP_CONNECTION'];
$port=$_SERVER['REMOTE_PORT'];

mysql_pconnect("localhost","youruser","yourpass");
mysql_select_db("clients_ips");

$fields="referer,user_agent,hostname,char_set,encoding,lang,connection,port,ip,timestamp";
$values="'$ref','$user_agent','$hostname','$char_set','$encoding','$lang','$connection','$port','$ip','$now'";
$q="insert into current_ips ($fields) values ($values)";
$r=mysql_query($q);

?>

And when they hit that it will insert into the db.....

You could also pw protect it and on the client side have them login..

I mean this si just one way to do it.. there are ton of other ways.. this one is just really simple heh

Hi.

I used to have the same problem. I found a program that mails me the dynamic IPs of my customers. This program has to be installed in one Windows PC in the customer network. Works OK. No need to send the IP addresses to a 3rd party, or signup for a lot of domains.

http://www.geocities.com/alvaro_de_leon_sc/TellMeTheDynIP.html

JPC

Hi all.

I'm a consultant working for several customers. I usually need to connect to their computers through internet. Some of them use dynamic ips so I have to call on them to ask for the ip to be able to make the connection .... :(

I wonder if there can be an "automatic" solution for this...

Thank you in advance. ;)

Carlita.

Hi.

I used to have the same problem. I found a program that mails me the dynamic IPs of my customers. This program has to be installed in one Windows PC in the customer network. Works OK. No need to send the IP addresses to a 3rd party, or signup for a lot of domains.

http://www.geocities.com/alvaro_de_leon_sc/TellMeTheDynIP.html

JPC

Thank you John! Now I have 3 customers using this program. I always have their IPs in my mail, so I just use vnc or pcanywhere independently, at any time. I'm going to extend this to all the others! :lol:

Carlita

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.