Cellphone/Mobile Scripts (XHTML Mobile 2.3 Certified)!

NOTE make sure the variable:

$dayornight = ‘%dayornight%’; // Day or night flag

is IN your testtags.txt

(from the front page) – thats needed. See if that fixes it

tman,
I have that code in my testtags.txt file, maybe it’s located in the wrong place. I could send you the testtags.txt code if you would want to look at it or if you could tell me where it needs to be put we can try that. Thanks, Roger

sekywx.com/weather/cell.php

Well if it is, then it is not being uploaded correctly.

http://sekywx.com/weather/testtags.php?sce=view

if you look at that, there is no $dayornight variable.

Yep, you were right. In my ignorance #-o I had put it in the wrong file. I am Very new at coding, but I am learning and want to learn more. It fixed the problem and I’m so grateful to you, thanks again tman.

Hello to all,

For some reason if i go to download zip “cell-template” which is located in the first post it says: 404 - attachment not found.
Can someone please re-add the zip?? Thank you.

Silvio.

Thank you for alerting us to that. Due to a server crash the forum was transferred to a new server last week and it looks like some attachment links are now broken. I’ll notify the administrator :slight_smile:

The missing .zip file has now been restored.

tman
i have resolved the cell page advisory issue i had.
i had set up a cron job for my main page and not the cell.
as soon as i set it up for the cell page, all the advisories came through.
i am still unable to figure out why i am not getting the forecast discussion.
thanks
larry

and now for some unknown reason, it is working
thanks again

Worked for one day.
Forecast discussion again not loading on cell page
http://www.fortgeorgeweather.com/cell.php

Where is this filed stored?

http://www.fortgeorgeweather.com/forecast-discussion.txt

Something is breaking that… Look at forecast-summary.php

Also there is no link to your cell script from your home page.

actually if i recall thats the error when you are using the wrong version of advforecast2.php. I believe there was a change in that…

Also in forecast-summary.php

can you access.

http://forecast.weather.gov/product.php?site=NWS&issuedby=$myNWS&product=AFD&format=CI&version=1&glossary=0

correctly? (you need to change myNWS to your station call out in FL). But see if that link works first or possibly your myNWS variable is wrong.

ok now I fully understand whats going on…

The script looks for synopsis and extracts that…

When the NWS does not have that, the script will not work. So its working…

Compare:
http://forecast.weather.gov/product.php?site=NWS&issuedby=TWC&product=AFD&format=CI&version=1&glossary=0

to

http://forecast.weather.gov/product.php?site=NWS&issuedby=JAX&product=AFD&format=CI&version=1&glossary=0

There is a synopsis in the first one, but not the second.

what is the difference between the forecast-summary.php
and the forecast-discussion.php.
it appears the forecast-discussion.php is the updated version.
if i remove the forecast-summary.php, the forecast-discussion.php will generate the
discussion for jax.
however, when i change the cell-forecast.php to “include forecast-discussion.php”
it is not formatted correctly on my cell page.
thanks
larry
http://www.fortgeorgeweather.com/cell.php

forecast-summary.php is what you want. Forecast-discussion is the full nws forecast info. Used for normal pages.

See: http://frogville.us/wxforecast-discussion.php

Notice the “synopsis” that is what forecast-summary looks for. If the natl weather service doesnt put it for your area, then the script says unavail

http://frogville.us/cell-forecast.php

this is the output of my forecast-discussion.txt
http://www.fortgeorgeweather.com/forecast-discussion.txt

this is yours
http://frogville.us/forecast-discussion.txt

any ideas on what may be causing this?
thanks

Yes i’ve commented on this a few times… Its because the NWS does not have “Synopsis” is their forecast for your area at this time… I think you have missed that??

read your comments many times trying to figure it out.
so is there any reason why some nws sites provide synopsis and many don’t?

http://forecast.weather.gov/product_sites.php?site=NWS&product=AFD

No idea… but you said yours worked a cpl days ago, so i’m sure it will be back… if not, if yours uses something consistent, i could prob do a custom mod for you. Or you could look at the script also…

tman
looking at the forecast-summary.php, it appears that this part of the script as is would work for my forecast discussion.

$sstring = ‘…’; // start of synopis quick text
$estring = ‘&&’; // first divider
$start = strpos($discussion,$sstring); // starting position of where to keep
$end = strpos($discussion,$estring); // end of where to keep

can you tell me what would need to be modified in the script to allow the longer discussion versus the shorter synopsis?
thanks