Skip to content

Instantly share code, notes, and snippets.

@TomiToivio
Last active December 16, 2015 16:19
Show Gist options
  • Select an option

  • Save TomiToivio/5462059 to your computer and use it in GitHub Desktop.

Select an option

Save TomiToivio/5462059 to your computer and use it in GitHub Desktop.
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);
$filename = date("c") . ".kml";
file_put_contents($filename, $data);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment