Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'rzd.php';
- $test = new RZD();
- if ($test->auth())
- {
- //echo "ok";
- $json = json_decode($test->getPoints("Вязьма"));
- $test->setStartPoint($json[0]->{'pointID'}, $json[0]->{'pointTitle'});
- $test->getPoints("Москва");
- $json = json_decode($test->getPoints("Москва"));
- $test->setEndPoint($json[0]->{'pointID'}, $json[0]->{'pointTitle'});
- $test->setTrainDate("21.09.2019");
- $test->searchTrains();
- $test->setTrainNum("736М"); // обязательно
- $test->setTrainTime0("21:20"); // обязательно
- $test->setTrainTime1("23:33"); // обязательно
- //echo $test->getPlaces();
- echo $test->getStops();
- } else {
- echo "invalid auth";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement