<?php $json_write_to_text = file_get_contents("php://input"); //read the raw data $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)); // this is just for dumping the raw data and can be omitted ?>
Read more of this post
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.