3 |
|
|
4 |
#include "string_nocase.h" |
#include "string_nocase.h" |
5 |
#include "Util.h" |
#include "Util.h" |
6 |
|
#include "Exceptions.h" |
7 |
|
#include "Logger.h" |
8 |
|
|
9 |
|
#include "HttpClient.h" |
10 |
|
|
11 |
#include <vector> |
#include <vector> |
12 |
#include <sstream> |
#include <sstream> |
64 |
|
|
65 |
string url = string("http://www.bane.dk/visStation.asp?W=FJRN&S=") + stationcode + "&artikelId=4275&statnavn=" + stationname; |
string url = string("http://www.bane.dk/visStation.asp?W=FJRN&S=") + stationcode + "&artikelId=4275&statnavn=" + stationname; |
66 |
|
|
67 |
string raw_doc = Util::readUrl(url, "/tmp/sms_tog.tmp" ); |
//string raw_doc = Util::readUrl(url, "/tmp/sms_tog.tmp" ); |
68 |
|
|
69 |
|
string raw_doc; |
70 |
|
try |
71 |
|
{ |
72 |
|
raw_doc = HttpClient::GetString(url); |
73 |
|
} |
74 |
|
catch (httpexception& e) |
75 |
|
{ |
76 |
|
Logger::logMessage(e.what()); |
77 |
|
} |
78 |
|
|
79 |
if (raw_doc == "") |
if (raw_doc == "") |
80 |
{ |
{ |