Author Topic: WD Iphone script...  (Read 1709 times)

0 Members and 1 Guest are viewing this topic.

Offline ADM

  • Contributor
  • ***
  • Posts: 135
    • Barrow County Weather - Barrow County, Georgia
WD Iphone script...
« on: November 28, 2010, 03:35:15 PM »
Hello,

I am attempting to use the WD Phone script and can't seem to figure out how to configure the script for my area radar and advisories.  The script is using this for the advisories:

$warnzone = $_REQUEST['warnzone'];
$warncounty = $_REQUEST['warncounty'];
$warnlocal = $_REQUEST['warnlocal'];

//import NOAA Advisory info
//data can be altered by changing the zone and county numbers
//Target data ends up in $targetwarn and $targettext[0]

$html = implode('', file("http://www.srh.noaa.gov/showsigwx.php?warnzone=${warnzone}&warncounty=${warncounty}"));

I have added my Zone codes and changed the file location bey get nothing.

Also, any tips on setting up the radar section would also be appreciated.

Thanks!

Al...

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 923
    • North Bend Weather
Re: WD Iphone script...
« Reply #1 on: December 02, 2010, 08:52:34 PM »
Whats the link to your iphone page?

Here's mine.. http://www.snoqualmieweather.com/iphone.php
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam + Soil temp + Soil Moisture

Offline ADM

  • Contributor
  • ***
  • Posts: 135
    • Barrow County Weather - Barrow County, Georgia
Re: WD Iphone script...
« Reply #2 on: December 12, 2010, 07:18:00 AM »
Here is the link to my iphone page

http://www.barrowcountyweather.com/iphone.php

Thanks for your help!

Al

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 923
    • North Bend Weather
Re: WD Iphone script...
« Reply #3 on: December 12, 2010, 05:33:19 PM »
For my advisories this is how mine is setup..

Code: [Select]

<?php

// Force Defaults for Zone and County
if ( ! isset($_REQUEST['warnzone']) )
        
$_REQUEST['warnzone']="WAZ505";
if ( ! isset(
$_REQUEST['warncounty']) )
        
$_REQUEST['warncounty']="WAC033";
if ( ! isset(
$_REQUEST['warnlocal']) )
        
$_REQUEST['warnlocal']="Snoqualmie+WA";

//You can pass data to this script with:
// http://www.carterlake.org/testadvisory.php?warnzone=KYZ030&warncounty=KYC111&warnlocal=Anchorage+KY
//Where the zone is your zone and the county is your county and location is your location
//using pluses in place of spaces

$warnzone $_REQUEST['warnzone'];
$warncounty $_REQUEST['warncounty'];
$warnlocal $_REQUEST['warnlocal'];


This is my radar settings, theres 2 places that you need to change your settings. You should just be able to change your long. and lat. and it should work.

Code: [Select]

{
var myradius = radius*1.852;
var severe_overlay="http://wumaps.wunderground.com/cgi-bin/mapgen?theme=severe&stdout=1&size=278x278&lat=47.552548880794056&lon=-121.80756568908691&format=gif&alpha=1&radius="+myradius+"&r="+new Date().getTime();
document.getElementById('severe_overlay').src = severe_overlay;
return;
}
function changeRadarSource(animated, radius)
{
var num = 1;
if (animated == true)
num = 6;
document.getElementById('radarImage').src = "http://radblast.wunderground.com/cgi-bin/radar/WUNIDS_composite?centerlat=47.552548880794056&centerlon=-121.80756568908691&radius="+radius+"&type=N0R&frame=0&num="+num+"&delay=15&width=278&height=278&newmaps=1&r=1225814451&smooth=1&rainsnow=1&lat=47.552548880794056&lon=-121.80756568908691&label=You+Are+Here";
return;
}



"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam + Soil temp + Soil Moisture

Offline ADM

  • Contributor
  • ***
  • Posts: 135
    • Barrow County Weather - Barrow County, Georgia
Re: WD Iphone script...
« Reply #4 on: December 13, 2010, 03:29:42 PM »
Thanks for your help!  Working now.

Al

 

anything