Skip to content

Utilizing CAP (Common Alert Protocol)

Rave Alert has been a major project that I have have been assigned to implement. This system provides an easy way of contacting students and staff in case of emergency via email, text message, voice call, Facebook and Twitter. We also use it for snow days and class cancellations. Not too long ago the helpful staff at Rave introduced me to the CAP XML standard. CAP is a standard not just specific to Rave, but many emergency alert systems. It is also used by various government agencies for sharing emergency information over multiple systems.

PHP CAP Alert Function

Once I heard of CAP, I knew we could use this XML standard in various ways to extend the reach of our own emergency alerts. One being the school web page. Here is a small function I put together using PHP that will display an emergency message on a web page:

Just include this code on your PHP page and then call it with the CAP URL location you want to pull from:

cap_parse("http://example.com/cap.xml");

CAP Desktop Alerting Software

Taking this a step further, I decided to get a little more familiar with .NET. It was brought to my attention that we were missing a desktop alert component. There are server-based systems out there that require some setup and a good deal of money. After a little thought, I concluded we could meet these same goals with a simple desktop client that used the CAP XML feed to trigger an emergency message. And in a couple days I had something built.

I thought this project warranted creating a Github repository. It’s still a little rough, but by bringing it to git, I’m hoping to get some more interest and input in this project. I’ve made the source code available, so maybe someone will find this code useful to bolster their own emergency alerting using CAP. Please visit my CAP Alerting Desktop repository if you are interested. Any contributions to the code are welcome.

Mentioned Resources:

PHP CAP Alert Function
CAP Desktop Alerting Software

Published inProgrammingThoughtsWeb

4 Comments

  1. Great to see you using our CAP functionality and sharing it with the world. Thank you very much!

    Todd Miller
    VP Public Safety Services

  2. Thanks, Todd. I’ve had nothing but good things to say about Rave and your staff has been mighty helpful.

  3. Nick Nick

    Hey Stefan,

    Do you still have this code out on github? The links appear to be broken and I am starting to work on a project very similar to this for my own university.

    Thanks,

  4. I know this is a really late reply to your message, Nick, and I apologize. I updated the PHP CAP Alert function for you to point to my own Github account. Unfortunately, I don’t think I have the CAP Alerting Software.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.