if ($_GET['hub_challenge']) {
// you should verify the subscription before returning the
challenge, but this will get you started.
echo $_GET['hub_challenge'];
} else if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$fp = fopen("php://input", 'r+');
$server = $_SERVER["QUERY_STRING"];
$xml_string = stream_get_contents($fp);
$xml = simplexml_load_string($xml_string);
}
On Feb 15, 9:59 am, Jesper <[email protected]> wrote:
> I am wondering if someone has some example code for the callack url
> content distribution in php.