NWS Weather Forecast Messenger PHP Script

Version: 1.04 - 22-Jul-2009 - added post authentication feature.
Now you can edit your cron job to use CURL and pass a username and password
so that the script can be in public view and it only emails when called from your cron job with the correct username and password.
This is the best way to allow the script to be in public and have the most accurate cron times, such as I use: every 6 hours (3,9,16,22) 3pm,9pm,3am,9am
This is a sample of my cron: (be sure to set your_username and your_password)
curl -d ‘username=your_username&password=your_password’ http://www.642weather.com/weather/nws-forecast-messenger.php >/dev/null 2>&1

Version: 1.05 - 22-Jul-2009

  • added configurable array of shorten_message words to settings.

  • shorten_twitter function changed to a shorten_message function that can shorten emails and twitters

  • added two more settings:
    // number of characters to attempt to shorten email message to
    $email_shorten = ‘120’;

// number of characters to attempt to shorten twitter message to
$twitter_shorten = ‘140’;