Update oebbApi_v0.3.php

This commit is contained in:
Fred 2014-08-28 10:43:14 +02:00
parent 8685a47066
commit 81513b12f5

View file

@ -13,7 +13,7 @@ class oebbApi {
}
public function __destruct() {
session_destroy();
// session_destroy();
}
public function get($departure, $arrival, $amount, $date = null, $time = null, $timeMode = false) {
@ -86,7 +86,8 @@ class oebbApi {
$img = pq('.resultTable:ep(0) td')->html();
$img = explode('<a href="', $img);
while (1) {
// while(1) {
while (true) {
$stations = pq('.nowrap.sepline:ep(' . $i . ')')->html();
$ankunft = explode("\n\n", pq(".center.sepline:nth-child(3n+3)")->text());
$abfahrt = explode("\n\n", pq(".center.sepline:nth-child(5n+5)")->text());