Skip to content

Instantly share code, notes, and snippets.

@ihatecsv
Created August 28, 2015 18:31
Show Gist options
  • Save ihatecsv/ff4ca101b321a7131d90 to your computer and use it in GitHub Desktop.
Save ihatecsv/ff4ca101b321a7131d90 to your computer and use it in GitHub Desktop.
<?php
header('Access-Control-Allow-Origin: *');
// was used when API address moved but apps were live on app store.
// create curl resource
$ch = curl_init();
error_log($_GET['m']);
// set url
curl_setopt($ch, CURLOPT_URL, "http://your.node.host:3000/sendmsg?m=" . $_GET['m']);
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output contains the output string
curl_exec($ch);
// close curl resource to free up system resources
curl_close($ch);
echo("success");
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment