/[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 192 by torben, Mon Dec 8 21:49:49 2008 UTC revision 193 by torben, Wed Dec 17 23:43:26 2008 UTC
# Line 3  Line 3 
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>
# Line 60  vector<TrainInfo> GetTrainInfo(string st Line 64  vector<TrainInfo> GetTrainInfo(string st
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          {          {

Legend:
Removed from v.192  
changed lines
  Added in v.193

  ViewVC Help
Powered by ViewVC 1.1.20