Author Topic: WXStatus & GRlevel3  (Read 868 times)

0 Members and 1 Guest are viewing this topic.

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
WXStatus & GRlevel3
« on: December 16, 2018, 04:38:26 PM »
So for now I have GRlevel3 publishing (uploading) to another server IE. http://www.mikeswxblog.com/GR3 my question is how do i implement this in this code so it actually shows it is being updated?

Code: [Select]
# start of custom checks (put your custom checks below)
        $tDir = './GR3/';
if(file_exists($tDir.'kind_br1_0.jpg')) {
           do_check(langtransstr("GRlevel3 Radar FTP"),$tDir.'kind_br1_0.jpg',10*60+15,'file');
                if(file_exists("radar-status.php")) { // add radar status check if available
   echo " <tr>\n";
   echo "   <td colspan=\"4\">\n";
   include_once("radar-status.php");
   echo "</td>\n";
   echo " </tr>\n";
}

        }
        $tDir = './';
if(file_exists($tDir.'forecast-summary.txt')) {
           do_check(langtransstr("Forecast Summary"),$tDir.'forecast-summary.txt',10*60+15,'file');

        }
# end of custom checks
« Last Edit: December 16, 2018, 04:52:54 PM by mkutche »
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WXStatus & GRlevel3
« Reply #1 on: December 16, 2018, 10:45:21 PM »
Since http://www.gosportwx.com/ and http://www.mikeswxblog.com/GR3 likely have different document roots in the filesystem, you may not be able to use relative addressing to say where (exactly) the GR3 directory is from one site to the other.

You need to know the absolute paths in the filesystem for each site to determine if relative addressing from the gosportwx site to the mikeswxblog site is possible.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline R_o_B

  • WxElement panel
  • Senior Member
  • *****
  • Posts: 85
Re: WXStatus & GRlevel3
« Reply #2 on: December 17, 2018, 12:25:36 PM »
You need to know the absolute paths in the filesystem for each site to determine if relative addressing from the gosportwx site to the mikeswxblog site is possible.
Ken, would using the 'realpath' PHP function not give him the canonicalized absolute pathname?

Remember not too long ago when I had to deal with the location of the True Type fonts and my solution was to, indeed, use the 'realpath' function...
R_o_B
---
eMail: weather@herray.net

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WXStatus & GRlevel3
« Reply #3 on: December 17, 2018, 12:32:41 PM »
I think he still has to understand the absolute paths to the respective directories on both sites in order to craft a relative address on the gosport site in wxstatus.php to the GR3 directory in the mikeswxblog site (assuming that BOTH are under his main hosting directory).

the realpath() function won't help unless you know the exactly what relative file addressing needs to be used -- it would then flesh out the absolute path for you, but you have to start with a good relative file path in the first place.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

 

anything