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
<? | |
//Check that the request is a POST, sent by ie8/9 and DOESN'T have a content-type with the request | |
if ($_SERVER['REQUEST_METHOD'] == "POST" && (bool)preg_match('/msie (8|9)./i', $_SERVER['HTTP_USER_AGENT']) && !isset($_SERVER['CONTENT_TYPE'])) { | |
//And parse it into the $_POST superglobal | |
parse_str(file_get_contents('php://input'), $_POST); | |
} | |
?> |
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
#!/usr/bin/env php | |
<?php | |
print("\n"); | |
//read from stdin | |
$rawdata = fgets(STDIN); | |
//pull out the callback from a jsonp request | |
$temp = explode('(', $rawdata, 2); | |
//check if the response is jsonp or not | |
$callback = false; |
NewerOlder