--- smsdaemon/plugins/TrainInfo.cpp 2008/12/17 20:55:13 192 +++ smsdaemon/plugins/TrainInfo.cpp 2008/12/17 23:43:26 193 @@ -3,6 +3,10 @@ #include "string_nocase.h" #include "Util.h" +#include "Exceptions.h" +#include "Logger.h" + +#include "HttpClient.h" #include #include @@ -60,7 +64,17 @@ string url = string("http://www.bane.dk/visStation.asp?W=FJRN&S=") + stationcode + "&artikelId=4275&statnavn=" + stationname; - string raw_doc = Util::readUrl(url, "/tmp/sms_tog.tmp" ); + //string raw_doc = Util::readUrl(url, "/tmp/sms_tog.tmp" ); + + string raw_doc; + try + { + raw_doc = HttpClient::GetString(url); + } + catch (httpexception& e) + { + Logger::logMessage(e.what()); + } if (raw_doc == "") {