Jump to content

Is there a function ... auto send IP


jmr3460

Recommended Posts

Is there some function that can be sent to a ddns service that returns the ip address of a ddns forward. I am working on a script that uses a dvr from a home and the owner wants to have the dvr stream to his website. Only thing the ISP changes his IP address ever so often. I was looking for a way to find out automatically if the home ip has been changed. Can anyone help?

Link to comment
Share on other sites

So if I do a script that goes to this ddns domain that forwards to this guys IP address this script will give me the forwarded ip and not the ddns ip address? PHP is a server side scripting language and for this to work (I think) this script would have to be on the server that I need the ip from. Right? How do I make the script bounce back? from a machine that does not have PHP on it at all?

Link to comment
Share on other sites

If you're gathering from his DVR, the easiest way would be to to use a dynamic dns service.

 

Since its from a stand alone DVR (and most likely not a PC), a cron job & using a pinging script on his side to your server with a password to gather the ip would probably be out of the question.

Link to comment
Share on other sites

I don't know about out of the question but this guy does not know much about these machines and I would have to teach him what to do. I have a script already that when opened with a user and password inserts takes the ip and inserts into a db if it is different than what is already their. Only thing is he was wanting something that is automatic. Maybe I could do something that would send him an email with a link that would run on a cron job every other day or so with a link just as a reminder.

 

I was really hoping for something that would get the new address that way. I really don't need his dvr ip just his IPS IP. Will windows run something that could open that script?

Link to comment
Share on other sites

It appears that Windows has a scheduler that can be setup to open a browser to a specific address. I think that if I set up a schedule that opens browser with an address to the script with some value in it for $_GET. Would there be any security risk to his machine in any way? Or is there a way to setup a self submitting login form?

Link to comment
Share on other sites

are you familiar with any computer programming languages?

it would be pretty easy to write a script which when the IP changes it loads a page on the server which takes the ip address.. visual studio has built in browser windows etc for its forms, so you could have a tiny application with a built in browser and each time the IP address changes (check say every 60seconds?) then it will tell the browser to go to that page... and it can have a built in authorisation code incase bots etc access it and the ip gets changed

 

i.e.

www.yourserver.com/php/updateIP.php?authCode=a4jsdncx8234jklsdj2343k52nKLJSDFAH3b

if (isset($_GET['authCode']) == 'a4jsdncx8234jklsdj2343k52nKLJSDFAH3b')
{
$ip = $_SERVER['REMOTE_ADDR'];

$sql = @mysql_query("UPDATE ipAddress SET ip = '$ip'");
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.