https://www.westlotto.com/wlinfo/WL_Inf ... elplanToto
in C++ einzulesen (mittels curlpp). Mit dem curl tool auf der commandozeile klappt das ganz gut:
curl -v https://www.westlotto.com/wlinfo/WL_Inf ... elplanToto
Code: Alles auswählen
* Trying 194.25.144.211...
* TCP_NODELAY set
* Connected to www.westlotto.com (194.25.144.211) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: jurisdictionC=DE; jurisdictionL=M�nster; businessCategory=Private Organization; ST=Nordrhein-Westfalen;
O=Westdeutsche Lotterie GmbH & Co. OHG; OU=Datacenter Management; CN=www.westlotto.com
* start date: Apr 4 00:00:00 2016 GMT
* expire date: Sep 18 23:59:59 2017 GMT
* subjectAltName: host "www.westlotto.com" matched cert's "www.westlotto.com"
* issuer: C=US; O=GeoTrust Inc.; CN=GeoTrust Extended Validation SHA256 SSL CA
* SSL certificate verify ok.
> GET /wlinfo/WL_InfoService?gruppe=SpielplanToto HTTP/1.1
> Host: www.westlotto.com
> User-Agent: curl/7.50.3
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Wed, 30 Aug 2017 10:00:49 GMT
< X-Xss-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< X-Frame-Options: https://www.westlotto.com
< Warning: 299 - "Call is deprecated and may be removed in a future release, please contact westlotto (OE 322)."
"Wed, 30 Aug 2017 10:00:49 GMT"
< Last-Modified: Wed, 30 Aug 2017 10:00:49 GMT
< Content-Length: 12741
< Vary: User-Agent
< Access-Control-Allow-Origin: *
< Cache-Control: must-revalidate
< Content-Type: text/xml;charset=ISO-8859-15
< Server: WestLotto
< Strict-Transport-Security: max-age=16070400
< Set-Cookie: WLSessCookie=NBBFCBAK; Expires=Wed, 30-Aug-2017 10:05:49 GMT; Path=/
<
<?xml version='1.0' encoding="ISO-8859-15" ?>
<root>
<exception></exception>
<version>1.0</version>
<datum>02.09.2017 - 03.09.2017</datum>
<ausspielung>35</ausspielung>
<spiele>
<nr>1</nr>
<heimverein>New England Revolution</heimverein>
<gastverein>Orlando City</gastverein>
<tendenz>3-4-3</tendenz>
<torergebnis></torergebnis>
<gewinnzahlew></gewinnzahlew>
<gewinnzahlaw></gewinnzahlaw>
<ersatzwertung></ersatzwertung>
</spiele>
<spiele>
<nr>2</nr>
<heimverein>Montreal Impact</heimverein>
<gastverein>Chicago Fire</gastverein>
<tendenz>2-4-4</tendenz>
<torergebnis></torergebnis>
<gewinnzahlew></gewinnzahlew>
<gewinnzahlaw></gewinnzahlaw>
<ersatzwertung></ersatzwertung>
</spiele>
...
</root>
Code: Alles auswählen
curlpp::Cleanup myCleanup;
curlpp::Easy myRequest;
myRequest.setOpt<Url>("http://www.westlotto.com/wlinfo/WL_InfoService?gruppe=SpielplanToto");
myRequest.perform();
OUTPUT:
<html>
<title>Request Denied!</title>
<body><center>
<h1>Request Denied!</h1>
<p>www.westlotto.de</p>
<p>If you have any questions contact the admin.</p>
</center></body></html>
Dnake!