riquezjp / kitchenTV

Kitchen TV; weather, clock, live news feeds & video for Raspberry pi using PHP/javascript
GNU General Public License v3.0
26 stars 12 forks source link

What is with the IP Check Tool? #9

Closed nhalstead closed 7 years ago

nhalstead commented 7 years ago

I saw a section in the code to compare the IP address to the static string given, what is the purpose for it? I was not sure, my first thought is that it was for the YouTube player and I have a pull request waiting and I searched the code and I only see it listed in one other spot....

Is this for a function that will allow the user to get a notification on the IP change?

nhalstead commented 7 years ago

The Fork I have

riquezjp commented 7 years ago

Yes, the purpose is to provide an on-screen warning if your IP changes. for example if you run a webserver at home your IP might change periodically. Its really just for my use, but i left it in there & disabled it.

You can turn it on in config.php $ipchecker=1 ~ there are also options for the IP to be set in config or in an external txt file.

The call is in index.php after the body tag, the function check_IP() is in inc_library.php towards the bottom.

nhalstead commented 7 years ago

In the Fork I have it caches the IP, you can set it up to cache for 30 days (Usually the normal IP refresh period)

riquezjp commented 7 years ago

Great idea, Thanks for your contribution. I hope you have fun with it!