Skip to content

Instantly share code, notes, and snippets.

@kdavidjames
kdavidjames / strip.php
Created April 15, 2014 06:17
Strip Heart Rate and Cadence Data From A Garmin .GPX File
<?php
// Check that we have a file
if((!empty($_FILES["file"])) && ($_FILES['file']['error'] == 0))
{
// Set some variables
$inputFile = $_FILES['file']['tmp_name'];
$outputFile = 'cleaned_'.$_FILES['file']['name'];
$nodesToStrip = $_POST['elements']; // array of child nodes to strip (hr|cad)