/[projects]/smsdaemon/plugins/TrainInfo.cpp
ViewVC logotype

Diff of /smsdaemon/plugins/TrainInfo.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 80 by torben, Thu Jun 12 12:47:32 2008 UTC revision 81 by torben, Sun Jun 15 19:33:02 2008 UTC
# Line 6  Line 6 
6    
7  #include <vector>  #include <vector>
8  #include <sstream>  #include <sstream>
9    #include <stdexcept>
10    
11    
12  using namespace std;  using namespace std;
13    
# Line 59  vector<TrainInfo> GetTrainInfo(string st Line 61  vector<TrainInfo> GetTrainInfo(string st
61          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;
62    
63          string raw_doc = Util::readUrl(url, "/tmp/sms_tog.tmp" );          string raw_doc = Util::readUrl(url, "/tmp/sms_tog.tmp" );
64    
65            if (raw_doc == "")
66            {
67                    throw std::runtime_error("Connection timeout");
68            }
69    
70          raw_doc = Util::str_replace(raw_doc, "\"", "'");          raw_doc = Util::str_replace(raw_doc, "\"", "'");
71    
72          string_nocase html = raw_doc.c_str();          string_nocase html = raw_doc.c_str();

Legend:
Removed from v.80  
changed lines
  Added in v.81

  ViewVC Help
Powered by ViewVC 1.1.20