Created
August 28, 2015 18:31
-
-
Save ihatecsv/ff4ca101b321a7131d90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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