Author Topic: [Resolved] problem with D-Link router and streaming cam  (Read 12656 times)

0 Members and 1 Guest are viewing this topic.

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
Re: [Resolved] problem with D-Link router and streaming cam
« Reply #50 on: October 06, 2009, 03:20:28 AM »
Could you post a copy of the script here?

Hi, sorry for the late reply, I was hoping Curly was going to post before i did  (as he has done) as i didnt know if he wanted it made public, but i would have asked him for you if he hadn't replied by this morning...
Kind regards
Bashy

Offline Axelvold

  • Forecaster
  • *****
  • Posts: 1704
    • Axelvold's weather and photo
Re: [Resolved] problem with D-Link router and streaming cam
« Reply #51 on: October 06, 2009, 05:55:16 AM »
I've been watching this thread for an answer because I have a similar issue with the web cams here.
Since it's not a fix for the topic, I hesitated on posting a work-around.

The script checks to see if the IP address is mine. If it is, the variable is the cameras address on the home network. If the address isn't my mine, then the variable is the web address for the camera.

Code: [Select]
<?php
$ipa 
$_SERVER['REMOTE_ADDR'];
if(
$ipa == '192.168.0.2') { $camIP 'http://192.168.0.12:8080'; }  // home url
else{ $camIP 'http://71.115.86.198:8080';} // visitors url
?>


I then replace the url for the camera video in the page with <?php echo $camIP ?>



Thanks Curly
Lars Magnusson
Axelvold / Sweden
55° 57' 41" N / 13° 6' 1" E
WX Station: Davis Vantage Pro2 Plus

 

anything