Skip to content

Instantly share code, notes, and snippets.

View iandundas's full-sized avatar

Ian Dundas iandundas

View GitHub Profile
@iandundas
iandundas / new_gist_file
Created May 20, 2013 04:39
PHP: Relay POST and GET requests to a new URL, and output the result
<?php
// was used when API address moved but apps were live on app store.
$ch = curl_init();
$path = $_SERVER['REQUEST_URI'];
$path = str_replace('/api/index.php','',$path);
$path = str_replace('/api/','/',$path);