<?php
$json_write_to_text = file_get_contents("php://input");
$json_write_to_text = json_decode($json_write_to_text, TRUE, 512, JSON_OBJECT_AS_ARRAY);
if($json_write_to_text['Type'] == SubscriptionConfirmation)
{
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $json_write_to_text['SubscribeURL'],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => $header,
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
}
file_put_contents("response.txt",print_r($json_write_to_text,true));
?>