Like to help out with hosting costs for WXForum.net? Use the donate page. Thanks!
0 Members and 1 Guest are viewing this topic.
John, rrrick8,I have attached two screen captures showing what I am seeing for both Reno and Grand Junction, CO. I see many other sites with similar results. For some reason, some of the sites display in a very wide format.
<!-- end of menubar --><div id="main-copy"> <pre> <table border="0" cellspacing="0" cellpadding="0" style="width: 700px; margin: 20px auto 0px auto;"> <tr> <td style="text-align:center;"><a href="http://www.weather.gov/rev/" onclick="window.open(this.href,'_blank');return false;" title="Click to view this forecast office" style="text-decoration: none; color: inherit;"><span style="font-size:20px; letter-spacing:2px;"><b><span style="color:#0061AC;">WEATHER STORY</span><br />Reno<br /><span style="font-size:60%; vertical-align: text-top;">Weather Forecast Office</span></b></span></a></td> </tr></table>
Quote from: W3DRM on December 30, 2017, 07:03:51 PMJohn, rrrick8,I have attached two screen captures showing what I am seeing for both Reno and Grand Junction, CO. I see many other sites with similar results. For some reason, some of the sites display in a very wide format.Your http://www.carsonvalleyweather.com/wxStory_inc.php is fine. All html is clear and correct for all cities, without or with text..But your wxstory.php has an extra line of code Code: [Select]<!-- end of menubar --><div id="main-copy"> <pre> <table border="0" cellspacing="0" cellpadding="0" style="width: 700px; margin: 20px auto 0px auto;"> <tr> <td style="text-align:center;"><a href="http://www.weather.gov/rev/" onclick="window.open(this.href,'_blank');return false;" title="Click to view this forecast office" style="text-decoration: none; color: inherit;"><span style="font-size:20px; letter-spacing:2px;"><b><span style="color:#0061AC;">WEATHER STORY</span><br />Reno<br /><span style="font-size:60%; vertical-align: text-top;">Weather Forecast Office</span></b></span></a></td> </tr></table>You should find that '<pre>' and remove it. That will take care of the very wide page, which only occurs when there is text below the map. That text will be as wide as the longest line, because of that '<pre>'. You can see that all bottom text is displayed in a monospaced courier font and without line-breaks. We can not check your php script online, so if you can not find that <pre> , post the script here with the .txt extension.Wim
<body><?php############################################################################include("header.php");############################################################################include("menubar.php");############################################################################?><div id="main-copy"> <?php include("wxStory_inc.php"); ?> <><!-- end main-copy --><?php############################################################################include("footer.php");############################################################################# End of Page############################################################################?>
(in_array($wswfo, $hpwxs)) ? $wxsurl = 'http://www.weather.gov/'.$wswfo.'/' : $wxsurl = 'http://www.weather.gov/'.$wswfo.'/weatherstory';
(in_array($wswfo, $hpwxs)) ? $wxsurl = 'https://www.weather.gov/'.$wswfo.'/' : $wxsurl = 'https://www.weather.gov/'.$wswfo.'/weatherstory';
$useCURL = true; // true=get data by cURL method false=stream data
Thanks, but no joy, Ken. Still no images. I tried to place 'oax' in the https array, but that didn't work either.Curly's code is more than a bit difficult for me to unwind. I've given it a shot but now I'm not even seeing new images show up in my '/wscache' directory.
function GetDataByCurl($url) { global $noted; // set globalwithfunction GetDataByCurl($url) { $url = str_replace("png ", "png?", $url); // added 3/1/18 global $noted; // set global
function getWSBystream($url) { global $noted;withfunction getWSBystream($url) { $url = str_replace("png ", "png?", $url); // added 3/1/18 global $noted;
Thanks, Jim! Works great!
Quote from: gwwilk on March 01, 2018, 12:45:02 PMThanks, Jim! Works great!Jerry - I notice the map does not change when you select the various green dots. Once I select another location, it always shows the Pocatello, ID section of the map. The wx story and header do change with each different selection. Not sure if it's me or not. I've tried it on Chrome and Firefox and get similar results.
I just tried Reno and it worked fine for me.As for the overlays on the US map working, are you using wscache as your cache? I had to go to that to fix something, but I don't remember what the problem was when I did that. I used to be able to remember things. - Jim
The Reno image is working now. I don't know what "wscache" is...
Quote from: W3DRM on March 02, 2018, 03:14:50 PMThe Reno image is working now. I don't know what "wscache" is...Created by wxStory_inc.php - $ws_cachefolder = './wscache/'; Also $wfomaps = './wsimages/';It's loaded with stuff!
Yes, I see them now. Both of them are loaded with files. I also have another folder named "wsmainimages". It has one file in it named WS_map.png. That same file is also located in the wsimages folder. They appear to be identical.
Quote from: W3DRM on March 02, 2018, 04:14:55 PMYes, I see them now. Both of them are loaded with files. I also have another folder named "wsmainimages". It has one file in it named WS_map.png. That same file is also located in the wsimages folder. They appear to be identical.Interesting - I don't have the "wsmainimages".