Skip to content

Instantly share code, notes, and snippets.

Created April 12, 2014 09:07
Show Gist options
  • Select an option

  • Save anonymous/10526007 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/10526007 to your computer and use it in GitHub Desktop.
<head>
<script src="//code.jquery.com/jquery-1.4.min.js">
</script>
</head>
<body>
<pre><?php
//** IMPORTANT TO ALLOW CORS **
header("Access-Control-Allow-Origin: *");
print_r($_POST);
print_r(file_get_contents("php://input"));
?></pre>
<script>
jQuery.post("http://127.0.0.1/cors.php","BASE64ENCODEDSTRING", function(d,s){console.log(d);});
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment