Skip to content

Instantly share code, notes, and snippets.

@exiva
Created January 29, 2012 01:32
Show Gist options
  • Save exiva/1696612 to your computer and use it in GitHub Desktop.
Save exiva/1696612 to your computer and use it in GitHub Desktop.
<?php
header('Content-type: text/xml');
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: POST, GET, OPTIONS");
$intme = date('YmdHis');
$start = $_GET['ind'];
$url = "http://some.data.source/data.xml";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
echo $output;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment