Author Topic: NWS Forecast Synopsis  (Read 247 times)

0 Members and 1 Guest are viewing this topic.

Offline tshattuck

  • Forecaster
  • *****
  • Posts: 325
    • Your Local Weather - Clay, NY
NWS Forecast Synopsis
« on: January 30, 2021, 04:37:46 PM »
Hello:
I am trying to add the NWS Synopsis to my Website home page.
When I run the W3C Validator I get the following errors:

Line 482, Column 3: "DOCTYPE" declaration not allowed in instance
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/

Error Line 483, Column 43: document type does not allow element "html" here
<html xmlns="http://www.w3.org/1999/xhtml">

File: http://yourlocalweather-clay-ny.com/indexDiscussion.php

I think PHP is creating the DOCTYPE more than once. Does anyone have any suggestions?
I tried removing the DOCTYPE from the attached file but that resulted in more errors.  :?

Any assistance is appreciated.
« Last Edit: January 30, 2021, 06:14:42 PM by tshattuck »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8386
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: NWS Forecast Synopsis
« Reply #1 on: January 30, 2021, 06:26:19 PM »
Sure... just use
Code: [Select]
$doIncludeFD = true;
include_once("forecast-discussion-synopsis.php");
to invoke the script.. it will turn off the extra headers/HTML and just return the results.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline tshattuck

  • Forecaster
  • *****
  • Posts: 325
    • Your Local Weather - Clay, NY
Re: NWS Forecast Synopsis
« Reply #2 on: January 30, 2021, 08:14:07 PM »
Ken:
With your changes my home page now loads without any errors.  =D&gt;

Your PHP expertise is greatly appreciated.

Thanks for your time and effort.
 

 

anything