Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. <?php
  2. include 'rzd.php';
  3. $test = new RZD();
  4.  
  5. if ($test->auth())
  6. {
  7. //echo "ok";
  8. $json = json_decode($test->getPoints("Вязьма"));
  9. $test->setStartPoint($json[0]->{'pointID'}, $json[0]->{'pointTitle'});
  10. $test->getPoints("Москва");
  11. $json = json_decode($test->getPoints("Москва"));
  12. $test->setEndPoint($json[0]->{'pointID'}, $json[0]->{'pointTitle'});
  13. $test->setTrainDate("21.09.2019");
  14. $test->searchTrains();
  15. $test->setTrainNum("736М"); // обязательно
  16. $test->setTrainTime0("21:20"); // обязательно
  17. $test->setTrainTime1("23:33"); // обязательно
  18. //echo $test->getPlaces();
  19. echo $test->getStops();
  20. } else {
  21. echo "invalid auth";
  22. }
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement