PHP Classes

File: example/Example.php

Recommend this page to a friend!
  Classes of Jakub Dubec   PHP GPX Library   example/Example.php   Download  
File: example/Example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP GPX Library
Parser and generator of GPS Exchange files
Author: By
Last change: Use php-cs-fixer to format code
Date: 6 years ago
Size: 398 bytes
 

Contents

Class file image Download
<?php
/**
 * Created 30/08/16 15:50
 * @author Jakub Dubec <jakub.dubec@gmail.com>
 */

use phpGPX\phpGPX;

require_once
'../vendor/autoload.php';

$gpx = new phpGPX();
$file = $gpx->load('Evening_Ride.gpx');

phpGPX::$PRETTY_PRINT = true;
$file->save('output_Evening_Ride.gpx', phpGPX::XML_FORMAT);

foreach (
$file->tracks as $track) {
   
var_dump($track->stats->toArray());
}